Skip to content

Commit 7170c1a

Browse files
committed
fix(rust-cli): clippy 1.100 needless_bool in enhanced_repl
Rust 1.100.0's clippy flags the trap check at enhanced_repl.rs:414 (needless_bool), which fails CI's -D warnings on any branch. Return the trap result directly. Checked with cargo +1.100.0 clippy --all-targets -D warnings and fmt --check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDjNR1ZoYKEPxSKE2nq
1 parent d66d383 commit 7170c1a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎impl/rust-cli/src/enhanced_repl.rs‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,9 @@ fn execute_segments(state: &mut ShellState, input: &str) -> Result<bool> {
410410
}
411411
}
412412
}
413-
// Fire any pending signal traps (e.g. trap 'handler' INT).
414-
if executable::run_pending_traps(state) {
415-
return Ok(true);
416-
}
417-
Ok(false)
413+
// Fire any pending signal traps (e.g. trap 'handler' INT); a trap that
414+
// runs `exit` ends the shell.
415+
Ok(executable::run_pending_traps(state))
418416
}
419417

420418
fn execute_line(state: &mut ShellState, input: &str) -> Result<bool> {

0 commit comments

Comments
 (0)