fix: silence clippy::map_unwrap_or in rules_overhead (unblocks Clippy CI) - #767
Closed
cedric013 wants to merge 1 commit into
Closed
fix: silence clippy::map_unwrap_or in rules_overhead (unblocks Clippy CI)#767cedric013 wants to merge 1 commit into
cedric013 wants to merge 1 commit into
Conversation
cargo clippy --all-features -- -D warnings failed on rules_overhead.rs:143 (map(..).unwrap_or_else(..) on a Result). Use map_or_else, which clippy's own suggestion recommends. Behaviour unchanged: canonicalize the path, else fall back to the original. Fixes the red Clippy / Embed SDK jobs on main.
This was referenced Jul 9, 2026
Merged
3 tasks
Owner
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Closes #768.
cargo clippy --all-features -- -D warnings(the Clippy job) currently fails onmain:Introduced by
bf4ee7bf(symlink dedup, #759). This also fails the Embed SDK (lean-ctx-sdk) job, which clippy-checks the engine lib as a dependency.Fix: use
map_or_else(clippy's own suggestion). Behaviour is unchanged — canonicalize the path to a string, else fall back to the originalf.path.Test plan
cargo clippy --all-features -- -D warnings-> passes (no errors)cargo fmt --checkNotes for reviewers