Use &mut dyn Surface instead of &mut Box<dyn Surface>
This commit is contained in:
parent
9171df1e35
commit
7e4ae8450e
2 changed files with 2 additions and 2 deletions
|
|
@ -104,7 +104,7 @@ impl crate::graphics::Compositor for Compositor {
|
||||||
}
|
}
|
||||||
#[cfg(feature = "custom")]
|
#[cfg(feature = "custom")]
|
||||||
(Self::Custom(compositor), Surface::Custom(surface)) => {
|
(Self::Custom(compositor), Surface::Custom(surface)) => {
|
||||||
compositor.configure_surface(surface, width, height);
|
compositor.configure_surface(surface.as_mut(), width, height);
|
||||||
}
|
}
|
||||||
#[allow(unreachable_patterns)]
|
#[allow(unreachable_patterns)]
|
||||||
_ => panic!(
|
_ => panic!(
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ pub trait Compositor: std::any::Any {
|
||||||
|
|
||||||
fn configure_surface(
|
fn configure_surface(
|
||||||
&mut self,
|
&mut self,
|
||||||
surface: &mut Box<dyn Surface>,
|
surface: &mut dyn Surface,
|
||||||
width: u32,
|
width: u32,
|
||||||
height: u32,
|
height: u32,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue