chore: remove warnings

This commit is contained in:
əlemi 2022-11-03 03:04:44 +01:00
parent 32d68691a1
commit 1100b5f5fe
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 3 additions and 6 deletions

View file

@ -123,8 +123,8 @@ impl EditingModel {
}, },
metrics: view.metrics.borrow().iter() metrics: view.metrics.borrow().iter()
.enumerate() .enumerate()
.filter(|(i,x)| *metrics.get(*i).unwrap_or(&false)) .filter(|(i, _x)| *metrics.get(*i).unwrap_or(&false))
.map(|(i,m)| entities::panel_metric::ActiveModel { .map(|(_i, m)| entities::panel_metric::ActiveModel {
id: NotSet, id: NotSet,
panel_id: Set(panel.id), panel_id: Set(panel.id),
metric_id: Set(m.id), metric_id: Set(m.id),

View file

@ -11,8 +11,6 @@ use super::metric::metric_edit_ui;
pub fn source_panel(app: &mut App, ui: &mut Ui) { pub fn source_panel(app: &mut App, ui: &mut Ui) {
let source_to_put_metric_on : Option<i64> = None; let source_to_put_metric_on : Option<i64> = None;
let mut to_swap: Option<usize> = None;
let _to_insert: Vec<entities::metrics::Model> = Vec::new();
// let mut to_delete: Option<usize> = None; // let mut to_delete: Option<usize> = None;
let panels = &app.panels; let panels = &app.panels;
let panel_width = ui.available_width(); let panel_width = ui.available_width();
@ -23,10 +21,9 @@ pub fn source_panel(app: &mut App, ui: &mut Ui) {
// TODO only vertical! // TODO only vertical!
{ {
let sources = app.view.sources.borrow(); let sources = app.view.sources.borrow();
let sources_count = sources.len();
ui.heading("Sources"); ui.heading("Sources");
ui.separator(); ui.separator();
for (i, source) in sources.iter().enumerate() { for source in sources.iter() {
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.vertical(|ui| { ui.vertical(|ui| {
ui.add_space(10.0); ui.add_space(10.0);