Skip to content

Commit 722dda9

Browse files
committed
refactor(rm): remove unused fluent dep and fix iterator mutability
- Remove unused `fluent` dependency from Cargo.toml - Add `mut` to `values` iterator in preserve_root_all check to satisfy `any()` requirements - Reformat imports in linux.rs for consistency
1 parent 75464fb commit 722dda9

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/uu/rm/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ path = "src/rm.rs"
2121
thiserror = { workspace = true }
2222
clap = { workspace = true }
2323
uucore = { workspace = true, features = ["fs", "parser", "safe-traversal"] }
24-
fluent = { workspace = true }
2524
indicatif = { workspace = true }
2625

2726
[target.'cfg(unix)'.dependencies]

src/uu/rm/src/platform/linux.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use uucore::show_error;
2424
use uucore::translate;
2525

2626
use super::super::{
27-
InteractiveMode, Options, is_dir_empty, is_readable_metadata, prompt_descend, prompt_dir,
28-
prompt_file, remove_file, should_skip_different_device_with_dev, show_permission_denied_error,
29-
show_removal_error, verbose_removed_directory, verbose_removed_file,
27+
InteractiveMode, Options, is_dir_empty, is_readable_metadata, prompt_descend, remove_file,
28+
should_skip_different_device_with_dev, show_permission_denied_error, show_removal_error,
29+
verbose_removed_directory, verbose_removed_file,
3030
};
3131

3232
#[inline]

src/uu/rm/src/rm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
256256
preserve_root: !matches.get_flag(OPT_NO_PRESERVE_ROOT),
257257
preserve_root_all: matches
258258
.get_many::<String>(OPT_PRESERVE_ROOT)
259-
.map_or(false, |values| values.any(|v| v == "all")),
259+
.map_or(false, |mut values| values.any(|v| v == "all")),
260260
recursive: matches.get_flag(OPT_RECURSIVE),
261261
dir: matches.get_flag(OPT_DIR),
262262
verbose: matches.get_flag(OPT_VERBOSE),

0 commit comments

Comments
 (0)