From 9a6fe4c3d8828766e057e6094dfcab934bf63270 Mon Sep 17 00:00:00 2001 From: Mikhail Malyshev Date: Thu, 31 Oct 2024 13:22:50 +0100 Subject: [PATCH] Cleanup some linter errors Signed-off-by: Mikhail Malyshev --- src/application.rs | 2 +- src/ui/app_page.rs | 2 +- src/ui/input_dialog.rs | 1 - src/ui/ipdialog.rs | 2 +- src/ui/ui.rs | 1 - src/ui/window.rs | 2 ++ 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/application.rs b/src/application.rs index 438aca7..db3582b 100644 --- a/src/application.rs +++ b/src/application.rs @@ -461,6 +461,7 @@ impl Application { // send initial redraw event self.invalidate(); + #[allow(unused_assignments)] let mut do_redraw = true; let app_cancel_token = CancellationToken::new(); @@ -649,7 +650,6 @@ impl Application { ); self.ui.pop_layer(); } - _ => {} }, _ => {} } diff --git a/src/ui/app_page.rs b/src/ui/app_page.rs index 0c342b1..5c83516 100644 --- a/src/ui/app_page.rs +++ b/src/ui/app_page.rs @@ -173,7 +173,7 @@ impl IPresenter for ApplicationsPage { area: &ratatui::prelude::Rect, frame: &mut ratatui::Frame<'_>, model: &std::rc::Rc, - focused: bool, + _focused: bool, ) { self.render_app_list(model, *area, frame); } diff --git a/src/ui/input_dialog.rs b/src/ui/input_dialog.rs index 4fa1a4a..f1a7354 100644 --- a/src/ui/input_dialog.rs +++ b/src/ui/input_dialog.rs @@ -127,7 +127,6 @@ fn on_child_ui_action( pub fn create_input_dialog( window_caption: &str, caption: &str, - id: &str, content: &str, hint: &str, ) -> impl IWindow { diff --git a/src/ui/ipdialog.rs b/src/ui/ipdialog.rs index 648cc7d..7e6af33 100644 --- a/src/ui/ipdialog.rs +++ b/src/ui/ipdialog.rs @@ -324,7 +324,7 @@ fn update_current_layout(w: &mut Window, rect: &Rect) { } } -fn ip_dialog_layout(w: &mut Window, rect: &Rect, model: &Rc) { +fn ip_dialog_layout(w: &mut Window, rect: &Rect, _model: &Rc) { debug!("ip_dialog_layout. selected tab: {}", w.state.selected_tab); w.clear_layout(); diff --git a/src/ui/ui.rs b/src/ui/ui.rs index e9cf701..8f2a37c 100644 --- a/src/ui/ui.rs +++ b/src/ui/ui.rs @@ -255,7 +255,6 @@ impl Ui { let d = create_input_dialog( "Change server URL", "Server URL", - "id", url, "https://prod.zedcontrol.zededa.net", ); diff --git a/src/ui/window.rs b/src/ui/window.rs index f6d43bb..cd3fb44 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -90,11 +90,13 @@ impl WindowBuilder { self } + #[allow(dead_code)] pub fn with_taborder(mut self, tab_order: Vec) -> Self { self.tab_order = Some(tab_order); self } + #[allow(dead_code)] pub fn with_focused_view>(mut self, name: S) -> Self { self.focused_view = Some(name.into()); self