Repository navigation
refactor(output): drop unused Result on shell-install print helpers - #2670
Merged
Merged
Conversation
`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]>
This was referenced May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/output/shell_integration.rs:215-228(print_skipped_shells) and:264-379(print_shell_install_result) returnedanyhow::Result<()>despite never producing an error — both bodies areeprintln!over a slice/struct with no?operators. Dropping theResultremoves a dead?from the only internal call site, and main.rs's install closure becomesprint_shell_install_result(&scan_result); Ok(())to keep theand_then's shape.Test plan
cargo buildsucceedscargo clippy --no-deps -- -D warningscleancargo fmt --checkcleancargo test --lib outputpassesCloses part of #2663.