| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 9bba8eba-344c-475a-849e-2f6d79dc5c69 📥 CommitsReviewing files that changed from the base of the PR and between e1d1331 and 5bf2a0c. 📒 Files selected for processing (3)
📝 Walkthrough WalkthroughAdds four new Clippy warn lints (tuple_array_conversions, while_float, assigning_clones, manual_assert) to the workspace configuration, then updates all affected code sites to comply: replacing if/panic with assert!, .clone() assignments with clone_from, "...".to_owned() with String::from, making hash_float a const fn, and minor cleanups in os.rs and JIT. ChangesClippy lint enforcement and code fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1 ❌ Failed checks (1 warning)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)crates/stdlib/src/json.rs (1)167-183: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Keep parse_constant callback arguments as strings.
Line 172 now forwards b"NaN"/b"Infinity"/b"-Infinity" into self.parse_constant.call(...), so this path passes Python bytes instead of the str tokens that call_scan_once still uses at Lines 594, 599, and 605. That breaks the callback contract for these constants depending on which scanner path is taken.
Proposed fix🤖 Prompt for AI Agentsmacro_rules! parse_constant { - ($s:literal) => { - if rest.starts_with($s) { + ($bytes:literal, $token:literal) => { + if rest.starts_with($bytes) { return Ok(PyIterReturn::Return( vm.new_tuple(( - self.parse_constant.call(($s,), vm)?, - char_idx + $s.len(), + self.parse_constant.call(($token,), vm)?, + char_idx + $bytes.len(), )) .into(), )); } }; } - parse_constant!(b"NaN"); - parse_constant!(b"Infinity"); - parse_constant!(b"-Infinity"); + parse_constant!(b"NaN", "NaN"); + parse_constant!(b"Infinity", "Infinity"); + parse_constant!(b"-Infinity", "-Infinity");Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/stdlib/src/json.rs` around lines 167 - 183, The parse_constant callback in json scanning is receiving bytes for NaN/Infinity/-Infinity, which breaks the existing string-based contract. Update the constant parsing path in the macro in json.rs so `self.parse_constant.call(...)` is passed string tokens instead of byte literals, matching the `call_scan_once` paths and keeping `parse_constant` consistent across all scanner entry points.
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Outside diff comments: In `@crates/stdlib/src/json.rs`: - Around line 167-183: The parse_constant callback in json scanning is receiving bytes for NaN/Infinity/-Infinity, which breaks the existing string-based contract. Update the constant parsing path in the macro in json.rs so `self.parse_constant.call(...)` is passed string tokens instead of byte literals, matching the `call_scan_once` paths and keeping `parse_constant` consistent across all scanner entry points.
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 8424896a-357f-42eb-a11f-ce26e1fe854b
📥 CommitsReviewing files that changed from the base of the PR and between 0009dd6 and e1d1331.
📒 Files selected for processing (13)
Sorry, something went wrong.
This reverts commit f40f756.
* clippy `assigning_clones` * string_lit_as_bytes * tuple_array_conversions * while_float * manual_assert * Revert "string_lit_as_bytes" This reverts commit f40f756.
| Back | FazBrowse Home | New Git URL |
Summary
Summary by CodeRabbit