1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Use explicit Arc::clone to clarify when clones are cheap (#7784)

This commit is contained in:
Emil Ernerfeldt
2025-12-17 17:19:18 +01:00
committed by GitHub
parent 6157a35985
commit 986c2c0ffb
40 changed files with 80 additions and 71 deletions

View File

@@ -216,7 +216,7 @@ impl<'app> GlowWinitApp<'app> {
storage.as_deref(),
&mut self.native_options,
)?;
let gl = painter.gl().clone();
let gl = Arc::clone(painter.gl());
let max_texture_side = painter.max_texture_side();
glutin.max_texture_side = Some(max_texture_side);
@@ -234,9 +234,9 @@ impl<'app> GlowWinitApp<'app> {
&self.app_name,
&self.native_options,
storage,
Some(gl.clone()),
Some(Arc::clone(&gl)),
Some(Box::new({
let painter = painter.clone();
let painter = Rc::clone(&painter);
move |native| painter.borrow_mut().register_native_texture(native)
})),
#[cfg(feature = "wgpu_no_default_features")]
@@ -244,7 +244,7 @@ impl<'app> GlowWinitApp<'app> {
);
{
let event_loop_proxy = self.repaint_proxy.clone();
let event_loop_proxy = Arc::clone(&self.repaint_proxy);
integration
.egui_ctx
.set_request_repaint_callback(move |info| {