David Tolnay
a22b686f49
Release 1.0.75
v1.0.75
2022-01-15 16:53:20 -08:00
David Tolnay
36c43bfed5
Merge pull request #848 from serde-rs/num
...
Deserialize small numbers as integers in arbitrary_precision
2022-01-15 16:52:34 -08:00
David Tolnay
d541381455
Deserialize small numbers as integers in arbitrary_precision
2022-01-15 16:44:37 -08:00
David Tolnay
0ca5a69d73
Add regression test for issue 845
2022-01-15 16:40:22 -08:00
David Tolnay
66919777d0
Disable buggy iter_not_returning_iterator lint
...
https://github.com/rust-lang/rust-clippy/issues/8285
error: this method is named `iter` but its return type does not implement `Iterator`
--> src/map.rs:238:5
|
238 | pub fn iter(&self) -> Iter {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::iter-not-returning-iterator` implied by `-D clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_not_returning_iterator
error: this method is named `iter_mut` but its return type does not implement `Iterator`
--> src/map.rs:246:5
|
246 | pub fn iter_mut(&mut self) -> IterMut {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_not_returning_iterator
2022-01-14 18:59:32 -08:00
David Tolnay
aebe84cb09
Raise toolchain version for preserve_order to rust 1.46
...
Our indexmap dependency needs at least this version.
error[E0658]: use of unstable library feature 'vec_drain_as_slice': recently added
--> github.com-1ecc6299db9ec823/indexmap-1.8.0/src/map.rs:1182:30
|
1182 | let iter = self.iter.as_slice().iter().map(Bucket::refs);
| ^^^^^^^^
error[E0658]: use of unstable library feature 'vec_drain_as_slice': recently added
--> github.com-1ecc6299db9ec823/indexmap-1.8.0/src/set.rs:842:30
|
842 | let iter = self.iter.as_slice().iter().map(Bucket::key_ref);
| ^^^^^^^^
2022-01-07 18:37:31 -08:00
David Tolnay
3f459308f5
Set miriflags once for whole miri job
2022-01-03 12:01:56 -08:00
David Tolnay
c79d9ad2e1
Run miri also with some features enabled
2022-01-03 12:00:17 -08:00
David Tolnay
58d40de6ed
Release 1.0.74
v1.0.74
2022-01-01 12:13:38 -08:00
David Tolnay
ef7794f87f
Detect warnings in CI
2022-01-01 11:52:32 -08:00
David Tolnay
6de3d398ef
Merge pull request 841 from EFanZh/unsized-value-to-raw-value
2022-01-01 11:41:44 -08:00
EFanZh
012f567a38
Allow creating RawValues from references to unsized values
2022-01-01 19:03:16 +08:00
David Tolnay
18a88dad66
Avoid evaluating $c more than once in overflow macro
2021-12-30 21:43:05 -08:00
David Tolnay
5d2cbcdd4b
Eliminate lib module
2021-12-30 20:52:08 -08:00
David Tolnay
31198f589c
Switch to $(,)? in tri macro
...
The $(...)? operation is supported since Rust 1.32.
2021-12-30 19:50:01 -08:00
David Tolnay
51df12e0cd
Unconditionally import from alloc
...
Previously serde_json supported versions of rustc older than 1.36 which
didn't have a stable alloc crate. These days ever toolchain version we
support has alloc.
2021-12-30 19:44:15 -08:00
David Tolnay
95f67a0939
Ignore return_self_not_must_use clippy lint
...
error: missing `#[must_use]` attribute on a method returning `Self`
--> src/map.rs:595:5
|
595 | / pub fn and_modify<F>(self, f: F) -> Self
596 | | where
597 | | F: FnOnce(&mut Value),
598 | | {
... |
605 | | }
606 | | }
| |_____^
|
= note: `-D clippy::return-self-not-must-use` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
error: missing `#[must_use]` attribute on a method returning `Self`
--> src/value/mod.rs:836:5
|
836 | / pub fn take(&mut self) -> Value {
837 | | mem::replace(self, Value::Null)
838 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
2021-12-17 18:22:32 -08:00
David Tolnay
296f718e18
Release 1.0.73
v1.0.73
2021-12-13 14:19:58 -08:00
David Tolnay
48455de674
Update to itoa 1.0
2021-12-12 10:53:01 -08:00
David Tolnay
b66b0eb322
Track raw pointers in miri CI run
2021-12-11 15:05:19 -08:00
David Tolnay
52eec5e2ee
Add a miri test job in CI
2021-12-11 15:05:15 -08:00
David Tolnay
aaaf125f0b
Disable TcpStream test on miri
...
error: unsupported operation: can't call foreign function: getaddrinfo
--> nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/net.rs:191:21
|
191 | cvt_gai(c::getaddrinfo(c_host.as_ptr(), ptr::null(), &hints, &mut res))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function: getaddrinfo
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
2021-12-11 15:01:07 -08:00
David Tolnay
f0774c482a
Raise required rustc from 1.31 to 1.36
2021-12-11 15:00:37 -08:00
David Tolnay
c3eddcdf40
Collect imports to top of test suite
2021-12-11 14:53:18 -08:00
David Tolnay
a28529ddc9
Skip ui test when running in miri
2021-12-11 14:50:52 -08:00
David Tolnay
7db1ea907d
Ignore needless_late_init Clippy lint
...
error: unneeded late initalization
--> tests/../src/lexical/float.rs:173:9
|
173 | let exp: u64;
| ^^^^^^^^^^^^^
|
= note: `-D clippy::needless-late-init` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: declare `exp` here
|
174 | let exp: u64 = if (fp.exp == F::DENORMAL_EXPONENT) && (fp.mant & F::HIDDEN_BIT_MASK.as_u64()) == 0 {
| ++++++++++++++
help: remove the assignments from the branches
|
175 ~ 0
176 | } else {
177 ~ (fp.exp + F::EXPONENT_BIAS) as u64
|
help: add a semicolon after the `if` expression
|
178 | };
| +
2021-12-07 18:41:06 -08:00
David Tolnay
fc0ca07b10
Merge pull request #831 from serde-rs/from_u32
...
Skip error codepath on hex escape outside the surrogate range
2021-11-25 15:44:26 -08:00
David Tolnay
4a0924cbd1
Skip error codepath on hex escape outside the surrogate range
2021-11-25 15:30:50 -08:00
David Tolnay
76e376c8d1
Release 1.0.72
v1.0.72
2021-11-24 21:29:26 -08:00
David Tolnay
77915ebaa6
Merge pull request #829 from serde-rs/surrogate
...
Touch up PR 828
2021-11-24 21:27:17 -08:00
David Tolnay
265fb7ee40
Move discard of expected byte immediately after peek
2021-11-24 21:18:52 -08:00
David Tolnay
142207623a
Rearrange the early return on lone or encoded surrogate
2021-11-24 21:18:52 -08:00
David Tolnay
311f185d8e
Use binary mask to line up visually with the bits being |'d in
2021-11-24 21:18:52 -08:00
David Tolnay
11d3464f1c
Extract common logic of surrogate encode
2021-11-24 21:18:52 -08:00
David Tolnay
cb4a2517b2
Document why the parse_escape recursion is not dangerous
2021-11-24 21:18:52 -08:00
David Tolnay
7911e704a0
Tail recurse on parse_escape
2021-11-24 21:18:52 -08:00
David Tolnay
48dad22b3f
Collapse surrogate encode into extend_from_slice call
2021-11-24 21:18:51 -08:00
David Tolnay
683832a343
Touch up doc changes from PR 828
2021-11-24 21:18:51 -08:00
David Tolnay
691466c02e
Merge pull request #828 from lucacasonato/lone_surrogate
...
Deserialize lone surrogates into byte bufs
2021-11-24 21:18:39 -08:00
Luca Casonato
07c740c2ff
fix parsing escape sequences after lone surrogates
2021-11-24 23:48:42 +01:00
Luca Casonato
4c28c5737b
fix wording
2021-11-24 23:29:17 +01:00
Luca Casonato
849c6845b4
Deserialize lone surrogates into byte bufs
...
This commit deserializes lone surrogates in strings that are encoded in
escape sequences instead of erroring on them.
2021-11-24 14:50:33 +01:00
David Tolnay
33c3134cd2
Elaborate on StrRead::parse_str safety comment
2021-11-23 10:41:18 -08:00
David Tolnay
379412b138
Release 1.0.71
v1.0.71
2021-11-17 12:41:32 -08:00
David Tolnay
4125560711
Consolidate unsafe RawValue transmutes in one place
2021-11-17 12:36:54 -08:00
David Tolnay
dee8161ce5
Merge pull request #824 from jplatte/box-raw-value-to-underlying
...
Add impl From<Box<RawValue>> for Box<str>
2021-11-17 12:33:46 -08:00
David Tolnay
584f47674a
Merge pull request #821 from timothee-haudebourg/get_key_value
...
Add `Map::get_key_value` method.
2021-11-17 12:33:19 -08:00
Timothée Haudebourg
1ae5566f01
Disable get_key_value with older Rust versions.
2021-11-17 14:21:56 +01:00
Jonas Platte
37fe6b5fa8
Add impl From<Box<RawValue>> for Box<str>
...
Similar to the std impl From<Box<str>> for Box<[u8]>:
https://doc.rust-lang.org/std/boxed/struct.Box.html#impl-From%3CBox%3Cstr%2C%20A%3E%3E
2021-11-13 23:19:00 +01:00
David Tolnay
a050481b85
Release 1.0.70
v1.0.70
2021-11-12 19:08:47 -08:00