`eframe::Frame::info` returns a reference (#3301)
* Get a reference to `IntegrationInfo` * Add doc comment * Change `info` to return a reference * Clone integration info * Remove `&` * Clone integration info in another place
This commit is contained in:
parent
e3362dafac
commit
1b8e8cb38e
|
|
@ -762,8 +762,8 @@ impl Frame {
|
|||
}
|
||||
|
||||
/// Information about the integration.
|
||||
pub fn info(&self) -> IntegrationInfo {
|
||||
self.info.clone()
|
||||
pub fn info(&self) -> &IntegrationInfo {
|
||||
&self.info
|
||||
}
|
||||
|
||||
/// A place where you can store custom data in a way that persists when you restart the app.
|
||||
|
|
|
|||
|
|
@ -768,7 +768,7 @@ mod glow_integration {
|
|||
.expect("Single-use AppCreator has unexpectedly already been taken");
|
||||
let mut app = app_creator(&epi::CreationContext {
|
||||
egui_ctx: integration.egui_ctx.clone(),
|
||||
integration_info: integration.frame.info(),
|
||||
integration_info: integration.frame.info().clone(),
|
||||
storage: integration.frame.storage(),
|
||||
gl: Some(gl.clone()),
|
||||
#[cfg(feature = "wgpu")]
|
||||
|
|
@ -1242,7 +1242,7 @@ mod wgpu_integration {
|
|||
.expect("Single-use AppCreator has unexpectedly already been taken");
|
||||
let mut app = app_creator(&epi::CreationContext {
|
||||
egui_ctx: integration.egui_ctx.clone(),
|
||||
integration_info: integration.frame.info(),
|
||||
integration_info: integration.frame.info().clone(),
|
||||
storage: integration.frame.storage(),
|
||||
#[cfg(feature = "glow")]
|
||||
gl: None,
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ impl BackendPanel {
|
|||
// On web, the browser controls `pixels_per_point`.
|
||||
let integration_controls_pixels_per_point = frame.is_web();
|
||||
if !integration_controls_pixels_per_point {
|
||||
self.pixels_per_point_ui(ui, &frame.info());
|
||||
self.pixels_per_point_ui(ui, frame.info());
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
|
|
|
|||
Loading…
Reference in New Issue