forked from serde-rs/json
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from serde-rs:master #10
Open
pull
wants to merge
575
commits into
mesalock-linux:master
Choose a base branch
from
serde-rs:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
---- src/value/mod.rs - value::to_value (line 889) stdout ---- error[E0782]: trait objects must include the `dyn` keyword --> src/value/mod.rs:902:44 | 16 | fn compare_json_values() -> Result<(), Box<Error>> { | ^^^^^ | help: add `dyn` keyword before this trait | 16 | fn compare_json_values() -> Result<(), Box<dyn Error>> { | +++
This handles NaN and both positive and negative infinity.
This ensures consistency with the default `Formatter::write_f32` output format used elsewhere.
`deserialize_numeric_key!` has been renamed back to `deserialize_integer_key!`, and a new float-specific `deserialize_float_key!` macro has been introduced. This new macro attempts to deserialize float keys by delegating to the equivalent parent deserializer method.
An `unwrap` has been changed to simply discard the `Result`. We assume that writing to a `Vec` will never fail because the `std::io::Write` implementation never creates an I/O error.
Allow `f32` and `f64` map keys
Improve error message on invalid numeric key
warning: unnested or-patterns --> src/de.rs:251:17 | 251 | Some(b' ') | Some(b'\n') | Some(b'\t') | Some(b'\r') => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` help: nest the patterns | 251 | Some(b' ' | b'\n' | b'\t' | b'\r') => { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: unnested or-patterns --> src/de.rs:916:13 | 916 | e @ b'e' | e @ b'E' => self.scan_exponent(e as char, buf), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns = note: `-W clippy::unnested-or-patterns` implied by `-W clippy::pedantic` help: nest the patterns | 916 | e @ (b'e' | b'E') => self.scan_exponent(e as char, buf), | ~~~~~~~~~~~~~~~~~ warning: unnested or-patterns --> src/de.rs:941:13 | 941 | e @ b'e' | e @ b'E' => self.scan_exponent(e as char, buf), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns help: nest the patterns | 941 | e @ (b'e' | b'E') => self.scan_exponent(e as char, buf), | ~~~~~~~~~~~~~~~~~ warning: unnested or-patterns --> src/de.rs:1062:17 | 1062 | frame @ b'[' | frame @ b'{' => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns help: nest the patterns | 1062 | frame @ (b'[' | b'{') => { | ~~~~~~~~~~~~~~~~~~~~~ warning: unnested or-patterns --> src/de.rs:2331:13 | 2331 | / Some(b' ') | Some(b'\n') | Some(b'\t') | Some(b'\r') | Some(b'"') | Some(b'[') 2332 | | | Some(b']') | Some(b'{') | Some(b'}') | Some(b',') | Some(b':') | None => Ok(()), | |___________________________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnested_or_patterns help: nest the patterns | 2331 ~ Some(b' ' | b'\n' | b'\t' | b'\r' | b'"' | b'[' | b']' | b'{' | b'}' | b',' | 2332 ~ b':') | None => Ok(()), |
NLL has been in use since Rust 1.31 (for edition 2018+) or Rust 1.36 (for edition 2015). error[E0505]: cannot move out of `json` because it is borrowed --> src/raw.rs:184:29 | 180 | let borrowed = ::from_str::<&Self>(&json)?; | ---- borrow of `json` occurs here ... 184 | Ok(Self::from_owned(json.into_boxed_str())) | ^^^^ move out of `json` occurs here error[E0499]: cannot borrow `self.formatter` as mutable more than once at a time --> src/ser.rs:453:13 | 444 | formatter: &mut self.formatter, | -------------- first mutable borrow occurs here ... 453 | self.formatter | ^^^^^^^^^^^^^^ second mutable borrow occurs here ... 456 | } | - first borrow ends here error[E0499]: cannot borrow `self.writer` as mutable more than once at a time --> src/ser.rs:454:34 | 443 | writer: &mut self.writer, | ----------- first mutable borrow occurs here ... 454 | .end_string(&mut self.writer) | ^^^^^^^^^^^ second mutable borrow occurs here ... 456 | } | - first borrow ends here
Remove pre-NLL borrow checker workarounds
I don't feel this carries its weight after PR 1035.
Test on BE and 32-bit platforms on CI via Miri
Improve job names for miri jobs
Parse \uXXXX escapes faster
Optimize Unicode decoding by 1% 🤡
Various architectures have support for 64-bit integers, but there are Rust targets for those architectures where the pointer size is intentionally just 32-bit. For SWAR this smaller pointer size would negatively affect those targets, so this PR ensures the chunk size stays 64-bit on those targets.
Ensure the SWAR chunks are 64-bit in more cases
Unify chunk size choice between float and string parsing
Improve cfg names for fast arithmetic
…rializer Add support for 128 bit HashMap key serialization
warning: empty line after doc comment --> tests/../src/lexical/math.rs:277:5 | 277 | / /// ADDITION 278 | | | |_ ... 284 | pub fn iadd_impl(x: &mut Vec<Limb>, y: Limb, xstart: usize) { | ----------------------------------------------------------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `-W clippy::empty-line-after-doc-comments` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::empty_line_after_doc_comments)]` = help: if the empty line is unintentional remove it help: if the documentation should include the empty line include it in the comment | 278 | /// |
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.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )