1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Replace newtype with type alias

This commit is contained in:
Emil Ernerfeldt
2023-11-09 19:48:24 +01:00
parent 79bfca3657
commit 0c300e183d

View File

@@ -1908,22 +1908,7 @@ mod wgpu_integration {
parent_id: ViewportId,
}
#[derive(Default)]
pub struct Viewports(ViewportIdMap<Viewport>);
impl std::ops::Deref for Viewports {
type Target = ViewportIdMap<Viewport>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl std::ops::DerefMut for Viewports {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
pub type Viewports = ViewportIdMap<Viewport>;
/// State that is initialized when the application is first starts running via
/// a Resumed event. On Android this ensures that any graphics state is only