1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Fix some clippy warning from Rust 1.78.0 (#4444)

This commit is contained in:
Emil Ernerfeldt
2024-05-02 17:04:25 +02:00
committed by GitHub
parent c9b24d5a5c
commit ded8dbd45b
21 changed files with 37 additions and 72 deletions

View File

@@ -341,20 +341,6 @@ impl WinitApp for WgpuWinitApp {
.map_or(0, |r| r.integration.egui_ctx.frame_nr_for(viewport_id))
}
fn is_focused(&self, window_id: WindowId) -> bool {
if let Some(running) = &self.running {
let shared = running.shared.borrow();
let viewport_id = shared.viewport_from_window.get(&window_id).copied();
shared.focused_viewport.is_some() && shared.focused_viewport == viewport_id
} else {
false
}
}
fn integration(&self) -> Option<&EpiIntegration> {
self.running.as_ref().map(|r| &r.integration)
}
fn window(&self, window_id: WindowId) -> Option<Arc<Window>> {
self.running
.as_ref()