Skip to content

Commit

Permalink
Replace newtype with type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 9, 2023
1 parent 79bfca3 commit 0c300e1
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions crates/eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c300e1

Please sign in to comment.