Use &mut dyn Surface instead of &mut Box<dyn Surface>

This commit is contained in:
Héctor Ramón Jiménez 2024-03-21 06:03:31 +01:00
parent 9171df1e35
commit 7e4ae8450e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ impl crate::graphics::Compositor for Compositor {
}
#[cfg(feature = "custom")]
(Self::Custom(compositor), Surface::Custom(surface)) => {
compositor.configure_surface(surface, width, height);
compositor.configure_surface(surface.as_mut(), width, height);
}
#[allow(unreachable_patterns)]
_ => panic!(

View file

@ -153,7 +153,7 @@ pub trait Compositor: std::any::Any {
fn configure_surface(
&mut self,
surface: &mut Box<dyn Surface>,
surface: &mut dyn Surface,
width: u32,
height: u32,
);