From 71205203479b2600708b462301b9b28275024b4a Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Fri, 2 Feb 2024 23:09:30 +0100 Subject: [PATCH] Apply clippy fixes --- src/ui/app.rs | 2 +- src/ui/sheet_model.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/app.rs b/src/ui/app.rs index e5bb514..f732921 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -96,7 +96,7 @@ impl SimpleComponent for AppModel { let sheets_and_files: Vec = file_validation_result .validated_sheets .into_iter() - .chain(file_validation_result.updated_sheets.into_iter()) + .chain(file_validation_result.updated_sheets) .map(|sheet| SheetModelType::Sheet { sheet }) .chain(new_files_clone_iter) .collect(); diff --git a/src/ui/sheet_model.rs b/src/ui/sheet_model.rs index b97ac77..21c33fe 100644 --- a/src/ui/sheet_model.rs +++ b/src/ui/sheet_model.rs @@ -63,9 +63,9 @@ impl FactoryComponent for SheetModel { fn init_model(value: Self::Init, _index: &DynamicIndex, _sender: FactorySender) -> Self { let label = match &value { - SheetModelType::Sheet { sheet } => format!("{}", sheet.name), + SheetModelType::Sheet { sheet } => sheet.name.to_string(), SheetModelType::Pdf { path } => { - format!("{}", path.file_name().unwrap().to_str().unwrap()) + path.file_name().unwrap().to_str().unwrap().to_string() } };