1159 Commits

Author SHA1 Message Date
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
David Tolnay
bda64205e3
Resolve clippy comparison_to_empty lint 2020-11-05 18:06:55 -08:00
David Tolnay
ec7eeb6933
Suppress new manual_range_contains lint
RangeInclusive::contains was stabilized in rust 1.35.0, but we still
support 1.31.0.
2020-10-30 18:51:32 -07:00
David Tolnay
64bb3962bd
Release 1.0.59 v1.0.59 2020-10-12 13:36:16 -07:00
David Tolnay
9b64e0b17c
Format with rustfmt 1.4.22-nightly 2020-10-12 13:35:54 -07:00
David Tolnay
d615050597
Filter floats that parse to infinity from as_f64 2020-10-12 13:35:24 -07:00
David Tolnay
b1ca6c7186
Add test of as_f64 on large number
Closes https://github.com/serde-rs/json/issues/710.
2020-10-12 13:35:04 -07:00
David Tolnay
d6eae8ffc0
Release 1.0.58 v1.0.58 2020-09-30 13:36:33 -07:00
David Tolnay
9c38871ed9
Add no-std preserve_order check in CI 2020-09-30 13:35:06 -07:00
David Tolnay
e8bb41c94c
Fix no-std preserve_order build 2020-09-30 13:35:06 -07:00