Skip to content

Commit 735f0f0

Browse files
committed
refactor(rm): format prompt_yes! macro calls for readability
Break long prompt_yes! macro invocations into multiple lines in the handle_writable_directory function to improve code readability and adhere to formatting standards. No functional changes.
1 parent 82f7c24 commit 735f0f0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/uu/rm/src/rm.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,10 @@ fn handle_writable_directory(path: &Path, options: &Options, metadata: &Metadata
929929
)
930930
),
931931
(_, _, InteractiveMode::Always) => {
932-
prompt_yes!("{}", translate!("rm-prompt-remove-directory", "path" => path.quote()))
932+
prompt_yes!(
933+
"{}",
934+
translate!("rm-prompt-remove-directory", "path" => path.quote())
935+
)
933936
}
934937
(_, _, _) => true,
935938
}
@@ -940,7 +943,10 @@ fn handle_writable_directory(path: &Path, options: &Options, metadata: &Metadata
940943
#[cfg(not(unix))]
941944
fn handle_writable_directory(path: &Path, options: &Options, _metadata: &Metadata) -> bool {
942945
if options.interactive == InteractiveMode::Always {
943-
prompt_yes!("{}", translate!("rm-prompt-remove-directory", "path" => path.quote()))
946+
prompt_yes!(
947+
"{}",
948+
translate!("rm-prompt-remove-directory", "path" => path.quote())
949+
)
944950
} else {
945951
true
946952
}

0 commit comments

Comments
 (0)