1168 Commits

Author SHA1 Message Date
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
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
David Tolnay
2f812d0363
Add test of RawValue deserialization from invalid utf-8 2021-02-27 20:46:09 -08:00
David Tolnay
9bcb08fd92
Fix unnecessary trailing semicolon lints in test suite
warning: unnecessary trailing semicolon
        --> tests/test.rs:2133:6
         |
    2133 |     };
         |      ^ help: remove this semicolon
         |
         = note: `#[warn(redundant_semicolons)]` on by default

    warning: unnecessary trailing semicolon
        --> tests/test.rs:2166:6
         |
    2166 |     };
         |      ^ help: remove this semicolon
2021-02-27 20:44:53 -08:00
David Tolnay
d400899cbd
Release 1.0.63 v1.0.63 2021-02-25 09:38:33 -08:00
David Tolnay
461f2bfc39
Merge pull request 754 from Krout0n/entry#and_modify 2021-02-25 09:32:15 -08:00
Krouton
6e140a9192 Add Entry::and_modify 2021-02-25 21:14:02 +09:00
David Tolnay
64dd1e03e0
Merge pull request #752 from SamuelQZQ/patch-2
Fix method document in de.rs
2021-02-11 01:20:16 -08:00
QZQ
cf1118de1c
Fix method document in de.rs 2021-02-11 17:14:03 +08:00
David Tolnay
8d78020522
Release 1.0.62 v1.0.62 2021-02-05 14:05:08 -08:00
David Tolnay
b6c855dc09
Touch up PR 751 2021-02-05 13:57:39 -08:00
David Tolnay
e81e7d9ffa
Merge pull request #751 from icewind1991/value-display-utf8-unchecked
use from_utf8_unchecked in the fmt::Display implementation of Value
2021-02-05 13:57:32 -08:00
Robin Appelman
e0747b9979 use from_utf8_unchecked in the fmt::Display implementation of Value
`WriterFormatter` has been moved into it's own little module to enforce using it's `new` method to convey the unsafe requirements.
the safety requirements that the serializer only emits valid utf8 is already assumed by the existing `to_string` methods.

this speeds up formatting large `Value`s by about 33% in my testing
2021-02-05 21:06:47 +01:00
David Tolnay
7ff8ec6e8d
Merge pull request #744 from Carreau/patch-1
Update example to use Result<User, Box<dyn Error>>
2021-01-10 12:04:31 -08:00
Matthias Bussonnier
418507e475
Update example to use Result<User, Box<dyn Error>>
This seem to be what is now expected on stable; as the compiler warnings are saying; and also consistent with what `read_user_from_stream` example is using.
2021-01-10 09:53:41 -08:00
David Tolnay
44d7fe33fc
Intra-doc link for the crate::value link 2021-01-02 13:12:08 -08:00
David Tolnay
065cbef0ba
Merge pull request #739 from rory/minor-doc-improvement
make a html link in the doc comments
2021-01-02 13:10:14 -08:00
Rory McCann
347674c3dd make a html link in the doccomments 2021-01-02 10:33:05 +01:00
David Tolnay
613d66e9c5
Release 1.0.61 v1.0.61 2020-12-28 11:35:16 -08:00
David Tolnay
8225a8b917
Format with rustfmt 1.4.30-nightly 2020-12-28 11:35:08 -08:00
David Tolnay
e63aedb9f1
Merge pull request #737 from imp/value_from_number
Add impl From<Number> for Value
2020-12-28 11:33:43 -08:00
Cyril Plisko
5df9aeda41 Add impl From<Number> for Value
Addresses #736
2020-12-28 16:05:10 +02:00
David Tolnay
5a815a52bb
Ignore redundant_else pedantic clippy lint 2020-12-21 19:08:28 -08:00
David Tolnay
6a4cd8d218
Release 1.0.60 v1.0.60 2020-12-02 13:18:50 -08:00
David Tolnay
b9598ce50f
Merge pull request #733 from matklad/from-iter-of-pairs
Allow collecting an iterator of pairs into JSON object
2020-12-02 13:18:16 -08:00
Aleksey Kladov
0c4b4dfc8a Allow collecting an iterator of pairs into JSON object 2020-12-02 18:14:42 +03:00
David Tolnay
efc910404a
Suppress clippy unnecessary_wraps lints 2020-11-24 18:11:15 -08:00