Rename confirm() parameter to assume_yes for clarity
`yes: bool` read ambiguously at the type level; `assume_yes` matches the
conventional `-y/--assume-yes` meaning (proceed without prompting).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WXTzKy6U6UByDFzfCXehbc
diff --git a/src/bin/ranger/output.rs b/src/bin/ranger/output.rs
index c523229..0961d82 100644
--- a/src/bin/ranger/output.rs
+++ b/src/bin/ranger/output.rs
@@ -75,12 +75,12 @@ pub enum Confirm {
/// Decide whether a destructive action may proceed.
///
-/// If `yes` is set, proceeds without prompting. Otherwise, prompts on stderr
-/// when stdin is a terminal; when not interactive, returns [`Confirm::NeedsFlag`]
-/// so the caller can tell the user to pass `--yes` (never blocks a script on a
-/// prompt it can't answer).
-pub fn confirm(yes: bool, prompt: &str) -> Confirm {
- if yes {
+/// If `assume_yes` is set, proceeds without prompting. Otherwise, prompts on
+/// stderr when stdin is a terminal; when not interactive, returns
+/// [`Confirm::NeedsFlag`] so the caller can tell the user to pass `--yes`
+/// (never blocks a script on a prompt it can't answer).
+pub fn confirm(assume_yes: bool, prompt: &str) -> Confirm {
+ if assume_yes {
return Confirm::Yes;
}
if !std::io::stdin().is_terminal() {