From 49bc2776e7cdde07e1fe6d806fbc447592df42cc Mon Sep 17 00:00:00 2001 From: Anton Yemelyanov Date: Sat, 2 Dec 2023 12:37:50 +0200 Subject: [PATCH] cleanup --- core/src/core.rs | 13 ++++--------- core/src/egui/popup.rs | 1 - core/src/runtime/mod.rs | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/core/src/core.rs b/core/src/core.rs index 08110d2..7a231ec 100644 --- a/core/src/core.rs +++ b/core/src/core.rs @@ -391,10 +391,7 @@ impl eframe::App for Core { .show(ctx, |_ui| {}); CentralPanel::default() - .frame( - Frame::default() - .fill(ctx.style().visuals.panel_fill), - ) + .frame(Frame::default().fill(ctx.style().visuals.panel_fill)) .show(ctx, |ui| { ui.set_max_width(device_width); @@ -403,10 +400,9 @@ impl eframe::App for Core { }); if device.is_mobile() { - egui::TopBottomPanel::bottom("mobile_menu_panel") - .show_inside(ui, |ui| { - MobileMenu::new(self).render(ui); - }); + egui::TopBottomPanel::bottom("mobile_menu_panel").show_inside(ui, |ui| { + MobileMenu::new(self).render(ui); + }); } egui::CentralPanel::default() @@ -502,7 +498,6 @@ impl Core { .paint_at(ui, logo_rect); } - pub fn handle_events( &mut self, event: Events, diff --git a/core/src/egui/popup.rs b/core/src/egui/popup.rs index 6044bb8..41cf407 100644 --- a/core/src/egui/popup.rs +++ b/core/src/egui/popup.rs @@ -174,7 +174,6 @@ pub fn popup_above_or_below_widget_local( .inner }); - let mut close_popup = false; if close_on_interaction { if ui.input(|i| i.key_pressed(Key::Escape)) || widget_response.clicked_elsewhere() { diff --git a/core/src/runtime/mod.rs b/core/src/runtime/mod.rs index 590d1dc..e6cb654 100644 --- a/core/src/runtime/mod.rs +++ b/core/src/runtime/mod.rs @@ -15,11 +15,11 @@ pub mod payload; pub mod plugins; pub mod services; pub mod system; -use services::*; -use system::*; pub use device::Device; pub use payload::Payload; pub use services::Service; +use services::*; +use system::*; pub struct Inner { // services: Mutex>>,