diff options
Diffstat (limited to 'crates/vcs/src/data/vault/sheets.rs')
| -rw-r--r-- | crates/vcs/src/data/vault/sheets.rs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/crates/vcs/src/data/vault/sheets.rs b/crates/vcs/src/data/vault/sheets.rs index dfad862..bcd5779 100644 --- a/crates/vcs/src/data/vault/sheets.rs +++ b/crates/vcs/src/data/vault/sheets.rs @@ -53,11 +53,13 @@ impl Vault { let path = entry.path(); // Check if it's a YAML file - if path.is_file() && path.extension().is_some_and(|ext| ext == "yaml") - && let Some(file_stem) = path.file_stem().and_then(|s| s.to_str()) { - // Create a new SheetName and add it to the result list - sheet_names.push(file_stem.to_string()); - } + if path.is_file() + && path.extension().is_some_and(|ext| ext == "yaml") + && let Some(file_stem) = path.file_stem().and_then(|s| s.to_str()) + { + // Create a new SheetName and add it to the result list + sheet_names.push(file_stem.to_string()); + } } Ok(sheet_names) @@ -229,13 +231,14 @@ impl Vault { let path = entry.path(); if path.is_file() - && let Some(file_name) = path.file_stem().and_then(|s| s.to_str()) { - // Check if the filename starts with the sheet name - if file_name.starts_with(&sheet_name) { - found_path = Some(path); - break; - } + && let Some(file_name) = path.file_stem().and_then(|s| s.to_str()) + { + // Check if the filename starts with the sheet name + if file_name.starts_with(&sheet_name) { + found_path = Some(path); + break; } + } } let trash_path = found_path.ok_or_else(|| { |
