Apply clippy fixes

This commit is contained in:
Julian Mutter 2024-02-02 23:09:30 +01:00
parent 015247b284
commit 7120520347
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ impl SimpleComponent for AppModel {
let sheets_and_files: Vec<SheetModelType> = 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();

View File

@ -63,9 +63,9 @@ impl FactoryComponent for SheetModel {
fn init_model(value: Self::Init, _index: &DynamicIndex, _sender: FactorySender<Self>) -> 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()
}
};