Repository navigation
ci: fix lint with rust 1.99 - #309
Conversation
There was a problem hiding this comment.
No issues found across 1 file
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will degrade performance by 1.04%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | python_parse_numeric |
1.3 µs | 1.5 µs | -11.22% |
| ⚡ | true_array_jiter_value |
2.6 µs | 2.3 µs | +10.32% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing dh/lints-1.99 (4556a93) with main (c03ab2f)
Footnotes
-
2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
8e2f2a2 to
4556a93
Compare
There was a problem hiding this comment.
1 issue found across 4 reviewed files. 1 file intentionally excluded from review.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/jiter/src/string_decoder.rs">
<violation number="1" location="crates/jiter/src/string_decoder.rs:230">
P2: Map `e.valid_up_to()` from the decoded tape back to the original JSON string before adding it to `start`; a length-changing escape otherwise reports the wrong source index.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
View guided diff | Turn on auto-fix | Re-trigger cubic
| Ok(unsafe { from_utf8_unchecked(&bytes[..valid_up_to]) }) | ||
| } | ||
| Err(e) => Err(json_error!(InvalidUnicodeCodePoint, start + e.valid_up_to() + 1)), | ||
| Err(e) => Err(json_error!(InvalidUnicodeCodePoint, start + e.valid_up_to())), |
There was a problem hiding this comment.
P2: Map e.valid_up_to() from the decoded tape back to the original JSON string before adding it to start; a length-changing escape otherwise reports the wrong source index.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At crates/jiter/src/string_decoder.rs, line 230:
<comment>Map `e.valid_up_to()` from the decoded tape back to the original JSON string before adding it to `start`; a length-changing escape otherwise reports the wrong source index.</comment>
<file context>
@@ -227,7 +227,7 @@ fn to_str(bytes: &[u8], ascii_only: bool, start: usize, allow_partial: bool) ->
Ok(unsafe { from_utf8_unchecked(&bytes[..valid_up_to]) })
}
- Err(e) => Err(json_error!(InvalidUnicodeCodePoint, start + e.valid_up_to() + 1)),
+ Err(e) => Err(json_error!(InvalidUnicodeCodePoint, start + e.valid_up_to())),
}
}
</file context>
Summary by cubic
Fixes Rust 1.99 lint failures and aligns invalid UTF-8 error positions with the latest
serde_json.is_empty()assertions invalue.rstests withassert_eq!comparisons against empty slices.InvalidUnicodeCodePointerror index accounting instring_decoder.rsand updates affected tests to matchserde_json1.0.154 behavior.serde_jsondev-dependency to 1.0.154 and adds aninvalid_utf8_positiontest.Migration
serde_json.Written for commit 4556a93. Summary will update on new commits.