From 1100b5f5fe1779c85aaf206ae50bb61e158c956c Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 3 Nov 2022 03:04:44 +0100 Subject: [PATCH] chore: remove warnings --- src/gui/scaffold.rs | 4 ++-- src/gui/source.rs | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/scaffold.rs b/src/gui/scaffold.rs index edc17c4..01b1618 100644 --- a/src/gui/scaffold.rs +++ b/src/gui/scaffold.rs @@ -123,8 +123,8 @@ impl EditingModel { }, metrics: view.metrics.borrow().iter() .enumerate() - .filter(|(i,x)| *metrics.get(*i).unwrap_or(&false)) - .map(|(i,m)| entities::panel_metric::ActiveModel { + .filter(|(i, _x)| *metrics.get(*i).unwrap_or(&false)) + .map(|(_i, m)| entities::panel_metric::ActiveModel { id: NotSet, panel_id: Set(panel.id), metric_id: Set(m.id), diff --git a/src/gui/source.rs b/src/gui/source.rs index d45702e..d838e21 100644 --- a/src/gui/source.rs +++ b/src/gui/source.rs @@ -11,8 +11,6 @@ use super::metric::metric_edit_ui; pub fn source_panel(app: &mut App, ui: &mut Ui) { let source_to_put_metric_on : Option = None; - let mut to_swap: Option = None; - let _to_insert: Vec = Vec::new(); // let mut to_delete: Option = None; let panels = &app.panels; let panel_width = ui.available_width(); @@ -23,10 +21,9 @@ pub fn source_panel(app: &mut App, ui: &mut Ui) { // TODO only vertical! { let sources = app.view.sources.borrow(); - let sources_count = sources.len(); ui.heading("Sources"); ui.separator(); - for (i, source) in sources.iter().enumerate() { + for source in sources.iter() { ui.horizontal(|ui| { ui.vertical(|ui| { ui.add_space(10.0);