1207 Commits

Author SHA1 Message Date
David Tolnay
019b179cf7
Ui test changes for trybuild 1.0.49 2021-10-08 03:00:04 -04:00
David Tolnay
733b353394
Update ui test files 2021-10-07 00:19:07 -04:00
David Tolnay
f7a25e062a
Declare minimum Rust version in Cargo metadata 2021-10-02 02:31:21 -04:00
David Tolnay
552a6ee83e
Resolve semicolon_if_nothing_returned pedantic clippy lint
error: consider adding a `;` to the last statement for consistent formatting
       --> src/read.rs:680:9
        |
    680 |         self.delegate.begin_raw_buffering()
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.delegate.begin_raw_buffering();`
        |
        = note: `-D clippy::semicolon-if-nothing-returned` implied by `-D 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:756:9
        |
    756 |         R::begin_raw_buffering(self)
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `R::begin_raw_buffering(self);`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
2021-10-01 01:18:17 -04:00
David Tolnay
9a6dcf03de
Resolve redundant_closure_for_method_calls pedantic clippy lint
error: redundant closure
       --> src/number.rs:133:69
        |
    133 |                     return self.n.parse::<f64>().ok().map_or(false, |f| f.is_finite());
        |                                                                     ^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `f64::is_finite`
        |
        = note: `-D clippy::redundant-closure-for-method-calls` implied by `-D clippy::pedantic`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
2021-10-01 01:17:35 -04:00
David Tolnay
f5f23f9b7f
Resolve needless_borrow clippy lint
error: this expression borrows a reference (`&mut ser::Serializer<W, F>`) that is immediately dereferenced by the compiler
       --> src/ser.rs:759:59
        |
    759 |                     tri!(value.serialize(NumberStrEmitter(&mut *ser)));
        |                                                           ^^^^^^^^^ help: change this to: `*ser`
        |
        = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression borrows a reference (`&mut ser::Serializer<W, F>`) that is immediately dereferenced by the compiler
       --> src/ser.rs:768:61
        |
    768 |                     tri!(value.serialize(RawValueStrEmitter(&mut *ser)));
        |                                                             ^^^^^^^^^ help: change this to: `*ser`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2021-10-01 01:16:56 -04:00
David Tolnay
28fc9b4ddf
Run clippy also with features enabled 2021-10-01 01:15:43 -04:00
David Tolnay
9298f54ace
Resolve manual_str_repeat clippy lint 2021-10-01 01:11:06 -04:00
David Tolnay
019041e4d5
Resolve semicolon_if_nothing_returned pedantic clippy lint
error: consider adding a `;` to the last statement for consistent formatting
       --> tests/../src/lexical/float.rs:111:9
        |
    111 |         round_to_native::<F, _>(self, algorithm)
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `round_to_native::<F, _>(self, algorithm);`
        |
        = note: `-D clippy::semicolon-if-nothing-returned` implied by `-D 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
       --> tests/../src/lexical/math.rs:616:9
        |
    616 |         iadd_impl(x, y, 0)
        |         ^^^^^^^^^^^^^^^^^^ help: add a `;` here: `iadd_impl(x, y, 0);`
        |
        = 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
       --> tests/../src/lexical/math.rs:862:9
        |
    862 |         self.ishl(n as usize)
        |         ^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.ishl(n as usize);`
        |
        = 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
       --> tests/../src/lexical/math.rs:868:9
        |
    868 |         small::imul_pow5(self.data_mut(), n)
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `small::imul_pow5(self.data_mut(), n);`
        |
        = 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
       --> tests/lexical/float.rs:184:5
        |
    184 |     check_round_to_f64(10234494226754558294, -1086, 2498655817078750, -1074)
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `check_round_to_f64(10234494226754558294, -1086, 2498655817078750, -1074);`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
2021-10-01 01:09:12 -04:00
David Tolnay
0b5931550a
Resolve needless_borrow clippy lint
error: this expression borrows a reference (`&lexical::float::ExtendedFloat`) that is immediately dereferenced by the compiler
       --> tests/../src/lexical/algorithm.rs:136:45
        |
    136 |         u64::error_is_accurate::<F>(errors, &fp)
        |                                             ^^^ help: change this to: `fp`
        |
        = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2021-10-01 01:07:42 -04:00
David Tolnay
fc4db0306a
Run clippy on test suite too 2021-10-01 00:46:45 -04:00
David Tolnay
cf15614994
Move clippy lint level to CI job 2021-10-01 00:40:33 -04:00
David Tolnay
5a6af19aae
Skip clippy job on pull requests 2021-10-01 00:39:06 -04:00
David Tolnay
5bae82d2d2
Disable broken fuzz build in CI
https://github.com/rust-fuzz/cargo-fuzz/issues/276
2021-09-25 21:17:56 -07:00
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