David Tolnay
33b2677384
Suppress broken semicolon_if_nothing_returned lint
...
https://github.com/rust-lang/rust-clippy/issues/7768
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:849:1
|
849 | / seq_impl!(
850 | | BinaryHeap<T: Ord>,
851 | | seq,
852 | | BinaryHeap::clear,
... |
855 | | BinaryHeap::push
856 | | );
| |__^
|
note: the lint level is defined here
--> serde/src/lib.rs:97:52
|
97 | #![cfg_attr(feature = "cargo-clippy", deny(clippy, 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
help: add a `;` here
|
849 + seq_impl!(
850 + BinaryHeap<T: Ord>,
851 + seq,
852 + BinaryHeap::clear,
853 + BinaryHeap::with_capacity(size_hint::cautious(seq.size_hint())),
854 + BinaryHeap::reserve,
...
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:859:1
|
859 | / seq_impl!(
860 | | BTreeSet<T: Eq + Ord>,
861 | | seq,
862 | | BTreeSet::clear,
... |
865 | | BTreeSet::insert
866 | | );
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
859 + seq_impl!(
860 + BTreeSet<T: Eq + Ord>,
861 + seq,
862 + BTreeSet::clear,
863 + BTreeSet::new(),
864 + nop_reserve,
...
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:869:1
|
869 | / seq_impl!(
870 | | LinkedList<T>,
871 | | seq,
872 | | LinkedList::clear,
... |
875 | | LinkedList::push_back
876 | | );
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
869 + seq_impl!(
870 + LinkedList<T>,
871 + seq,
872 + LinkedList::clear,
873 + LinkedList::new(),
874 + nop_reserve,
...
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:879:1
|
879 | / seq_impl!(
880 | | HashSet<T: Eq + Hash, S: BuildHasher + Default>,
881 | | seq,
882 | | HashSet::clear,
883 | | HashSet::with_capacity_and_hasher(size_hint::cautious(seq.size_hint()), S::default()),
884 | | HashSet::reserve,
885 | | HashSet::insert);
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
879 + seq_impl!(
880 + HashSet<T: Eq + Hash, S: BuildHasher + Default>,
881 + seq,
882 + HashSet::clear,
883 + HashSet::with_capacity_and_hasher(size_hint::cautious(seq.size_hint()), S::default()),
884 + HashSet::reserve,
...
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:888:1
|
888 | / seq_impl!(
889 | | VecDeque<T>,
890 | | seq,
891 | | VecDeque::clear,
... |
894 | | VecDeque::push_back
895 | | );
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
888 + seq_impl!(
889 + VecDeque<T>,
890 + seq,
891 + VecDeque::clear,
892 + VecDeque::with_capacity(size_hint::cautious(seq.size_hint())),
893 + VecDeque::reserve,
...
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:1300:1
|
1300 | / map_impl!(
1301 | | BTreeMap<K: Ord, V>,
1302 | | map,
1303 | | BTreeMap::new());
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
1300 + map_impl!(
1301 + BTreeMap<K: Ord, V>,
1302 + map,
1303 + BTreeMap::new());;
|
error: consider adding a `;` to the last statement for consistent formatting
--> serde/src/de/impls.rs:1306:1
|
1306 | / map_impl!(
1307 | | HashMap<K: Eq + Hash, V, S: BuildHasher + Default>,
1308 | | map,
1309 | | HashMap::with_capacity_and_hasher(size_hint::cautious(map.size_hint()), S::default()));
| |___________________________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
1306 + map_impl!(
1307 + HashMap<K: Eq + Hash, V, S: BuildHasher + Default>,
1308 + map,
1309 + HashMap::with_capacity_and_hasher(size_hint::cautious(map.size_hint()), S::default()));;
|
2021-10-04 23:57:05 -04:00
David Tolnay
01ded9f405
Declare minimum Rust version in Cargo metadata
2021-10-02 02:43:22 -04:00
David Tolnay
65e1a50749
Release 1.0.130
2021-08-28 11:31:38 -07:00
David Tolnay
3f120fb355
Enable unsized Map/SeqAccess types to use the impl for &mut
2021-08-28 10:59:51 -07:00
David Tolnay
2b92c80cc1
Release 1.0.129
2021-08-23 15:01:24 -07:00
David Tolnay
4a66c5f33d
Support packed remote struct without destructuring
2021-08-23 14:38:33 -07:00
David Tolnay
75d8902371
Use try_fold in default implementation of collect_seq, collect_map
2021-08-21 14:00:51 -07:00
David Tolnay
a587eb8953
Release 1.0.128
2021-08-21 10:39:32 -07:00
Manish Goregaokar
082e18f9a1
Rust supports i128/u128 on emscripten post Rust 1.40
2021-08-20 21:57:06 -07:00
David Tolnay
e2f85681fe
Release 1.0.127
2021-07-30 20:59:13 -07:00
David Tolnay
985725f820
Resolve while_let_on_iterator clippy lint
...
error: this loop could be written as a `for` loop
--> serde/src/private/de.rs:2835:9
|
2835 | while let Some(item) = self.iter.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for item in &mut self.iter`
|
note: the lint level is defined here
--> serde/src/lib.rs:97:44
|
97 | #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
| ^^^^^^
= note: `#[deny(clippy::while_let_on_iterator)]` implied by `#[deny(clippy::all)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
error: this loop could be written as a `for` loop
--> serde/src/private/de.rs:2937:9
|
2937 | while let Some(item) = self.iter.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for item in &mut self.iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
2021-05-22 20:29:34 -07:00
Dirk Stolle
f68e9e901e
fix some typos
2021-05-15 16:18:05 +02:00
David Tolnay
d9c338ec4a
Release 1.0.126
2021-05-12 10:18:26 -07:00
David Tolnay
e9270e59f0
Release 1.0.125
2021-03-22 16:15:57 -07:00
David Tolnay
72060b779a
Extend test_format_u8 to include u8::MAX
...
This is equivalent to looping 0..=u8::MAX, except that `..=` syntax is
not supported on old rustc and `...` syntax is not supported on new
rustc, so loop it is.
2021-03-22 16:09:33 -07:00
David Tolnay
1bb23ad9d1
Remove format_u8 when not used by Ipv4Addr impl
2021-03-22 16:00:58 -07:00
David Tolnay
9be4c9654a
Merge pull request 2001 from saethlin/optimize-ipaddr
2021-03-22 16:00:11 -07:00
Ben Kimock
4114e90bac
Fix off-by-one mistake, explain the offset
2021-03-22 18:39:24 -04:00
Ben Kimock
8bb07b0743
skip UTF8 checking and initialize with b'.'
2021-03-22 18:15:50 -04:00
Ben Kimock
ba8c1d63c8
use the algorithm from itoa
2021-03-16 17:33:42 -04:00
Ben Kimock
857a805993
Faster Ipv4 serialization prototype
2021-03-16 10:41:13 -04:00
David Tolnay
5a8dcac2ed
Release 1.0.124
2021-03-05 19:55:40 -08:00
David Tolnay
697b082e90
Touch up PR 1997
2021-03-05 19:48:40 -08:00
Cary Yang
4118cec731
Prevent various panics when deserializing malformed SystemTime
2021-03-05 17:52:51 -08:00
David Tolnay
6b5e5a83d0
Ignore let_underscore_drop pedantic clippy lint
2021-02-18 19:31:39 -08:00
David Tolnay
bc6b2b1dee
Make json5 description capitalization consistent with other links
2021-02-10 23:13:12 -08:00
Mingun
b60c03ec3f
Extend test_internally_tagged_newtype_variant_containing_unit_struct to cover structs and seqs
2021-02-02 09:00:04 +05:00
Arthur Silva
de8ac1c0be
Allow floats to be deserialized from ints in untagged unions
2021-01-26 17:47:20 +01:00
David Tolnay
3d6c4149b1
Release 1.0.123
2021-01-25 13:43:11 -08:00
David Tolnay
b0cc213e57
Omit derive helpers in versions older than serde_derive msrv
2021-01-24 20:26:56 -08:00
David Tolnay
74ca06662e
Omit size_hint::cautious when not allocating
2021-01-24 20:24:03 -08:00
David Tolnay
38edb473de
Move size_hint module out of private::de
2021-01-24 20:23:07 -08:00
David Tolnay
1c03647656
Move InPlaceSeed out of private mod
2021-01-24 20:23:06 -08:00
David Tolnay
1a3ef39040
Merge pull request #1842 from Timmmm/fix2
...
Allow floats to be deserialized from ints in tagged unions
2021-01-24 18:48:46 -08:00
David Tolnay
48556a4c7f
Reduce post-macro-expansion code in integer deserialize impls
2021-01-24 18:26:50 -08:00
David Tolnay
d88a4748f7
Remove unused $ty arg from internal impl_deserialize_num macro
2021-01-24 17:06:36 -08:00
David Tolnay
ffed19243d
Release 1.0.122
2021-01-24 16:17:29 -08:00
David Tolnay
2fd5212204
Remove unused trait impls on private MapAsEnum
2021-01-23 23:19:48 -08:00
David Tolnay
cdc2fa1b9f
Eliminate inferred bound on error type of value deserializer Debug impls
2021-01-23 23:15:41 -08:00
David Tolnay
ac4001e590
Remove some unused trait impls from private UnitOnly variant accessor
2021-01-23 23:07:13 -08:00
David Tolnay
fbcb2230bb
Make use of fmt::Result type alias from libcore
2021-01-23 22:57:13 -08:00
David Tolnay
86c88bea12
Hide some irrelevant detail from de::value::Error's Debug impl
2021-01-23 22:49:00 -08:00
David Tolnay
82d0fe00fd
Add link to rust-lang/rust#67295
2021-01-23 22:32:30 -08:00
David Tolnay
e61261e002
Move doctest-only helpers to a doc module
2021-01-23 22:32:30 -08:00
David Tolnay
9fd56cd41c
Remove unused __private_deserialize macro, originally for doctests
2021-01-23 22:26:16 -08:00
David Tolnay
f6e7366b46
Remove unused Debug impl on private::ser::content::Content
2021-01-23 22:10:48 -08:00
David Tolnay
1f9f72bc48
Merge pull request 1898 from Mingun/bytes-into-deserializer
2021-01-23 22:04:20 -08:00
David Tolnay
3f48ed36cc
Restore compatibility with rustc <1.31 in Borrowed identifier deserializer
...
The implied lifetime bound on T only works on 1.31+. Older versions fail
with:
error[E0309]: the parameter type `T` may not live long enough
--> serde/src/private/de.rs:2548:37
|
2548 | pub struct Borrowed<'de, T: ?Sized>(pub &'de T);
| -- ^^^^^^^^^^
| |
| help: consider adding an explicit lifetime bound `T: 'de`...
|
note: ...so that the reference type `&'de T` does not outlive the data it points at
--> serde/src/private/de.rs:2548:37
|
2548 | pub struct Borrowed<'de, T: ?Sized>(pub &'de T);
| ^^^^^^^^^^
2021-01-23 20:19:33 -08:00
David Tolnay
b6a2d07f26
Return IdentifierDeserializer to just one associated type
...
The BorrowedDeserializer was added in #1917 , but only makes sense for
&str and &[u8], not for u64 which also needs to be have an
IdentifierDeserializer impl.
2021-01-23 20:04:58 -08:00
David Tolnay
e6b6602a42
Merge pull request 1914 from Mingun/seq-other
2021-01-23 19:50:39 -08:00