jq: route //'s OneCursorValue fast path through cursor_is_truthy - #2820
Merged
Conversation
…ruthy each_alternative_generic's OneCursorValue fast path (the keys_unsorted iteration case, #1599/#1606/#1609) still inlined `c.is_falsy(JsonConvention::Preserve)` directly instead of calling cursor_is_truthy -- the one site cursor_is_truthy's own doc comment claimed to cover ("so `//`/`and`/`or`/`not` structurally cannot drift") but didn't actually reach. No behavior change; closes the gap between that claim and the code.
CoverageTotal: 93.3% ⚪ 0 pp vs Comparing No per-file coverage changes vs 🔇 0 ignored region(s), 76 tolerated region(s)
Patch coveragePatch: 0% (0/1 new lines covered)
Uncovered new lines (1)
|
CoverageTotal: 93.2% ⚪ 0 pp vs Comparing No per-file coverage changes vs 🔇 0 ignored region(s), 77 tolerated region(s)
Patch coveragePatch: 0% (0/1 new lines covered)
Uncovered new lines (1)
|
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
Follow-up to #2813 (#2665 item 3).
each_alternative_generic'sOneCursorValuefast path (thekeys_unsortediteration case, #1599/#1606/#1609) still inlinedc.is_falsy(JsonConvention::Preserve)directly instead of callingcursor_is_truthy-- the one cursor-backed truthiness sitecursor_is_truthy's own doc comment claimed to cover ("so///and/or/notstructurally cannot drift") but didn't actually reach.No behavior change -- closes the gap between that doc comment's claim and the code.
Test plan
cargo build --features clicargo clippy --all-targets --all-features -- -D warningscargo test --features cli,simd,regex,serde(full suite)keys_unsortedlazy-keys fast path)