Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Dec 2, 2023
1 parent 277b8ea commit 32dcf5f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
1 change: 0 additions & 1 deletion winit/src/multi_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pub use state::State;

use crate::conversion;
use crate::core;
use crate::core::mouse;
use crate::core::renderer;
use crate::core::widget::operation;
use crate::core::window;
Expand Down
20 changes: 16 additions & 4 deletions winit/src/multi_window/window_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,22 @@ where
self.entries.values().last()?.raw.current_monitor()
}

pub fn remove(&mut self, id: Id) {
if let Some(window) = self.entries.remove(&id) {
let _ = self.aliases.remove(&window.raw.id());
}
pub fn remove(&mut self, id: Id) -> Option<Window<A, C>> {
let window = self.entries.remove(&id)?;
let _ = self.aliases.remove(&window.raw.id());

Some(window)
}
}

impl<A, C> Default for WindowManager<A, C>
where
A: Application,
C: Compositor<Renderer = A::Renderer>,
<A::Renderer as crate::core::Renderer>::Theme: StyleSheet,
{
fn default() -> Self {
Self::new()
}
}

Expand Down

0 comments on commit 32dcf5f

Please sign in to comment.