1193 Commits

Author SHA1 Message Date
David Tolnay
9420d3a0a4
Release 1.0.68 v1.0.68 2021-09-14 13:12:44 -07:00
David Tolnay
d86e353575
Merge pull request #801 from dtolnay/negative0
Parse -0 as float -0.0 instead of integer 0
2021-09-14 13:12:07 -07:00
David Tolnay
51a4db1631
Parse -0 as float -0.0 instead of integer 0 2021-09-14 13:01:38 -07:00
David Tolnay
f5219be867
Add test parsing -0 2021-09-14 12:52:55 -07:00
David Tolnay
b419f2e065
Test negative zero parsing to f32 2021-09-14 12:51:27 -07:00
David Tolnay
ef823af7d5
Suppress unused field in test_borrow_in_map_key
warning: field is never read: `map`
        --> tests/test.rs:2233:9
         |
    2233 |         map: BTreeMap<MyMapKey, ()>,
         |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = note: `#[warn(dead_code)]` on by default
2021-09-14 12:50:03 -07:00
David Tolnay
f4fc150c45
Fix dead code warning in issue 795 regression test
warning: field is never read: `x`
     --> tests/regression/issue795.rs:9:15
      |
    9 |     Variant { x: u8 },
      |               ^^^^^
      |
      = note: `#[warn(dead_code)]` on by default
2021-09-14 12:49:18 -07:00
David Tolnay
133bb61574
Ignore derivable_impls clippy false positive
https://github.com/rust-lang/rust-clippy/issues/7655

    error: this `impl` can be derived
       --> src/map.rs:254:1
        |
    254 | / impl Default for Map<String, Value> {
    255 | |     #[inline]
    256 | |     fn default() -> Self {
    257 | |         Map {
    ...   |
    260 | |     }
    261 | | }
        | |_^
        |
        = note: `#[deny(clippy::derivable_impls)]` implied by `#[deny(clippy::all)]`
        = help: try annotating `map::Map` with `#[derive(Default)]`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
2021-09-09 19:26:17 -07:00
David Tolnay
f6bbab4835
Release 1.0.67 v1.0.67 2021-08-28 11:36:59 -07:00
David Tolnay
55efb3f0f2
Merge pull request #796 from dtolnay/visitobject
Detect unknown struct variant fields deserializing from Value
2021-08-28 11:30:39 -07:00
David Tolnay
c7b7186957
Detect unknown struct variant fields deserializing from Value 2021-08-28 11:21:54 -07:00
David Tolnay
12207ed2a3
Add regression test for issue 795 2021-08-28 11:21:40 -07:00
David Tolnay
7b4585fbff
Merge pull request #794 from dtolnay/visitarray
Use existing helpers for running visit_seq over a Vec/slice
2021-08-28 11:12:02 -07:00
David Tolnay
89cfb456ff
Use existing helpers for running visit_seq over a Vec/slice 2021-08-28 11:03:27 -07:00
David Tolnay
604d5cf6fe
Merge pull request #793 from dtolnay/valuede
Delete several other superfluous Deserializer impls
2021-08-28 10:49:34 -07:00
David Tolnay
cdc2ad3781
Delete Deserializer impl from value:🇩🇪:MapRefDeserializer 2021-08-28 10:40:49 -07:00
David Tolnay
cb1e7301d6
Delete Deserializer impl from value:🇩🇪:SeqRefDeserializer 2021-08-28 10:39:55 -07:00
David Tolnay
fcd94f0a90
Delete Deserializer impl from value:🇩🇪:SeqDeserializer 2021-08-28 10:37:47 -07:00
David Tolnay
ac9078e977
Merge pull request #792 from dtolnay/valuemapde
Delete Deserializer impl from value::‍de::MapDeserializer
2021-08-28 10:37:14 -07:00
David Tolnay
acfd0a7419
Delete Deserializer impl from value:🇩🇪:MapDeserializer 2021-08-28 10:27:30 -07:00
David Tolnay
6346bb3003
Release 1.0.66 v1.0.66 2021-07-29 14:39:16 -07:00
David Tolnay
7780a670e7
Merge pull request #789 from serde-rs/orpattern
Restore compatiblity with older rustc after PR 786
2021-07-29 14:38:51 -07:00
David Tolnay
53e6ce4a67
Restore compatiblity with older rustc after PR 786 2021-07-29 14:32:50 -07:00
David Tolnay
c38fc6530b
Merge pull request #786 from ruifengx/master
Make arbitrary_precision preserve the exact string representation
2021-07-29 14:30:53 -07:00
David Tolnay
c9193d4ed9
Release 1.0.65 v1.0.65 2021-07-28 14:17:56 -07:00
David Tolnay
f20557691d
Merge pull request 788 from jplatte/doc-cfg 2021-07-28 14:11:22 -07:00
Jonas Platte
6f15a0e1b2
Add doc(cfg(feature = "std")) attribute where appropriate 2021-07-27 19:09:38 +02:00
Jonas Platte
d8f70a3861
Add CI job to ensure documentation can be built 2021-07-27 18:57:22 +02:00
Jonas Platte
e2978b6a77
Document unbounded_depth, raw_value feature-gated API via doc_cfg 2021-07-27 18:57:22 +02:00
Ruifeng Xie
21523246e5
Make arbitrary_precision preserve the exact string representation 2021-07-17 11:27:27 +08:00
David Tolnay
ea39063f9c
Update preserve_order required compiler to 1.38.0 for hashbrown
Required by indexmap introducing a dependency on hashbrown 0.11, which
does not build with rustc 1.36.0.

    error[E0658]: use of unstable library feature 'ptr_cast'
       --> github.com-1ecc6299db9ec823/hashbrown-0.11.2/src/raw/mod.rs:504:57
        |
    504 |         NonNull::new_unchecked(self.table.ctrl.as_ptr().cast())
        |                                                         ^^^^

    error[E0658]: use of unstable library feature 'ptr_cast'
        --> github.com-1ecc6299db9ec823/hashbrown-0.11.2/src/raw/mod.rs:1275:51
         |
    1275 |         NonNull::new_unchecked(self.ctrl.as_ptr().cast())
         |                                                   ^^^^

    error[E0658]: use of unstable library feature 'ptr_cast'
      --> github.com-1ecc6299db9ec823/hashbrown-0.11.2/src/raw/sse2.rs:49:40
       |
    49 |         Group(x86::_mm_loadu_si128(ptr.cast()))
       |                                        ^^^^

    error[E0658]: use of unstable library feature 'ptr_cast'
      --> github.com-1ecc6299db9ec823/hashbrown-0.11.2/src/raw/sse2.rs:59:39
       |
    59 |         Group(x86::_mm_load_si128(ptr.cast()))
       |                                       ^^^^

    error[E0658]: use of unstable library feature 'ptr_cast'
      --> github.com-1ecc6299db9ec823/hashbrown-0.11.2/src/raw/sse2.rs:69:34
       |
    69 |         x86::_mm_store_si128(ptr.cast(), self.0);
       |                                  ^^^^
2021-06-30 10:28:26 -07:00
David Tolnay
df1fb717ba
Resolve semicolon_if_nothing_returned clippy lints
error: consider adding a `;` to the last statement for consistent formatting
       --> src/map.rs:55:9
        |
    55  |         self.map.clear()
        |         ^^^^^^^^^^^^^^^^ help: add a `;` here: `self.map.clear();`
        |
    note: the lint level is defined here
       --> src/lib.rs:304:22
        |
    304 | #![deny(clippy::all, clippy::pedantic)]
        |                      ^^^^^^^^^^^^^^^^
        = note: `#[deny(clippy::semicolon_if_nothing_returned)]` implied by `#[deny(clippy::pedantic)]`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned

    error: consider adding a `;` to the last statement for consistent formatting
       --> src/read.rs:719:9
        |
    719 |         R::discard(self)
        |         ^^^^^^^^^^^^^^^^ help: add a `;` here: `R::discard(self);`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned

    error: consider adding a `;` to the last statement for consistent formatting
       --> src/read.rs:769:9
        |
    769 |         R::set_failed(self, failed)
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `R::set_failed(self, failed);`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
2021-06-04 20:52:08 -07:00
David Tolnay
e4057c7d1f
Change readme run buttons to tab style 2021-05-16 09:53:35 -07:00
David Tolnay
9e457129f8
Merge pull request 778 from jayeshmann/patch-1 2021-05-16 09:16:07 -07:00
Jayesh Mann
9cbdfc8464
Overlapping button fix
Run-in-playground and Copy-to-clipboard were overlapping.
2021-05-16 20:26:00 +05:30
David Tolnay
8604ef948b
Merge pull request #777 from striezel-stash/fix-typos
fix typos
2021-05-15 10:14:03 -07:00
Dirk Stolle
a56df5c07c fix typos 2021-05-15 15:11:39 +02:00
David Tolnay
892e2a8264
Update ui test suite to nightly-2021-05-14 2021-05-13 19:15:50 -07:00
David Tolnay
6c6823a6b3
Update rustdoc link to serde-json-core 2021-04-15 07:46:13 -07:00
David Tolnay
762882122d
Merge pull request #773 from ratijas/patch-1
Update link to serde-json-core
2021-04-15 07:45:32 -07:00
ratijas
fdaddf2931
Update link to serde-json-core 2021-04-15 17:36:51 +03:00
David Tolnay
7ca63e7d5a
Resolve branches_sharing_code clippy lint
error: all if blocks contain the same code at the start
       --> src/ser.rs:319:9
        |
    319 | /         if len == Some(0) {
    320 | |             tri!(self
    321 | |                 .formatter
    322 | |                 .begin_array(&mut self.writer)
    323 | |                 .map_err(Error::io));
        | |_____________________________________^
        |
    note: the lint level is defined here
       --> src/lib.rs:304:9
        |
    304 | #![deny(clippy::all, clippy::pedantic)]
        |         ^^^^^^^^^^^
        = note: `#[deny(clippy::branches_sharing_code)]` implied by `#[deny(clippy::all)]`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
    help: consider moving the start statements out like this
        |
    319 |         tri!(self
    320 |         .formatter
    321 |         .begin_array(&mut self.writer)
    322 |         .map_err(Error::io));
    323 |         if len == Some(0) {
        |

    error: all if blocks contain the same code at the start
       --> src/ser.rs:388:9
        |
    388 | /         if len == Some(0) {
    389 | |             tri!(self
    390 | |                 .formatter
    391 | |                 .begin_object(&mut self.writer)
    392 | |                 .map_err(Error::io));
        | |_____________________________________^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
    help: consider moving the start statements out like this
        |
    388 |         tri!(self
    389 |         .formatter
    390 |         .begin_object(&mut self.writer)
    391 |         .map_err(Error::io));
    392 |         if len == Some(0) {
        |
2021-04-08 19:43:44 -07:00
David Tolnay
d279a78a23
Merge pull request 770 from DavidKorczynski/patch-1 2021-04-08 07:39:38 -07:00
DavidKorczynski
2cd354a827
Fix breaking OSS-Fuzz coverage build 2021-04-08 15:36:40 +01:00
David Tolnay
d735585370
Merge pull request 758 from Krout0n/use-try-fold 2021-02-28 23:59:40 -08:00
Krouton
ff03ed0894 use Iterator::try_fold instead of for loop in Value::pointer_functions 2021-03-01 15:09:57 +09:00
David Tolnay
d0d80783d3
Release 1.0.64 v1.0.64 2021-02-27 20:58:47 -08:00
David Tolnay
8d3b890ef8
Fix IoRead's raw buffering on invalid utf-8 as well 2021-02-27 20:58:24 -08:00
David Tolnay
054326ea8a
Merge pull request #757 from serde-rs/panicraw
Fix panic deserializing RawValue from invalid utf-8 bytes
2021-02-27 20:54:05 -08:00
David Tolnay
c64c1d7429
Fix panic deserializing RawValue from invalid utf-8 bytes 2021-02-27 20:46:09 -08:00