Skip to content

refactor(output): drop unused Result on shell-install print helpers - #2670

Merged
max-sixty merged 1 commit into
mainfrom
refactor/issue-2663-shell-integration-result
May 10, 2026
Merged

max-sixty merged 1 commit into
mainfrom
refactor/issue-2663-shell-integration-result

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Summary

src/output/shell_integration.rs:215-228 (print_skipped_shells) and :264-379 (print_shell_install_result) returned anyhow::Result<()> despite never producing an error — both bodies are eprintln! over a slice/struct with no ? operators. Dropping the Result removes a dead ? from the only internal call site, and main.rs's install closure becomes print_shell_install_result(&scan_result); Ok(()) to keep the and_then's shape.

Test plan

  • cargo build succeeds
  • cargo clippy --no-deps -- -D warnings clean
  • cargo fmt --check clean
  • cargo test --lib output passes

Closes part of #2663.

`print_skipped_shells` and `print_shell_install_result` returned
`anyhow::Result<()>` but their bodies only use `eprintln\!`/`cformat\!` —
no `?`, nothing fallible. The signatures forced every caller to thread
an artificial `?` (or wrap with `Ok(())`) for a result that never had a
failure path. Drop the `Result` from both, fix the two internal call
sites, and adjust main.rs's `and_then` closure to keep its
`Result<(), _>` shape with an explicit `Ok(())` after the install-print
call.

Closes part of #2663.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@max-sixty
max-sixty merged commit 3b1b752 into main May 10, 2026
31 checks passed
@max-sixty
max-sixty deleted the refactor/issue-2663-shell-integration-result branch May 10, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants