Mingun
094f63b86a
Introduce a forward_deserializer macro.
...
It helps to create deserializers that can stop time: save the value and then use visitor to get it later!
2020-10-23 19:03:14 +05:00
Mingun
42fa79455e
Make BytesDeserializer
public
2020-10-23 12:13:57 +05:00
Mingun
104ad9a7dd
Allow to define custom expectation message for type with #[serde(expecting = "...")]
...
Closes #1883
2020-10-23 01:23:01 +05:00
Mingun
34de1e00c8
Implement IdentifierDeserializer for u64 instead of u32 because all identifiers deserialized with visit_u64
2020-10-22 16:35:28 +05:00
David Tolnay
fc3f104c4a
Release 1.0.117
2020-10-15 09:49:03 -07:00
Mingun
e6d2322e68
Fix misprint in the error message
2020-10-12 00:03:21 +05:00
David Tolnay
2b504099e4
Include room for SocketAddrV6 to serialize scope id
...
https://github.com/rust-lang/rust/pull/77426
2020-10-05 04:02:05 -07:00
Mingun
db3074a40f
Implement IntoDeserializer for Cow<[u8]>
2020-10-04 13:38:31 +05:00
Mingun
2e821eab4b
Make impl IntoDeserializer for &[u8] public
2020-10-03 16:43:31 +05:00
David Tolnay
be7d0e7eb2
Ignore map_err_ignore Clippy pedantic lint
2020-09-25 21:55:59 -04:00
David Tolnay
b539cb45d7
Release 1.0.116
2020-09-11 11:56:19 -07:00
Josh Triplett
45c45e87bf
Fix hand-written enum variant deserializations to allow u64 discriminant
...
Automatically generated enum variant deserializers allowed any integer
type as the discriminant, but the hand-written ones for specific enum
types such as Result or IpAddr only allowed types up to u32. This broke
some non-human-readable deserializers for these enums, with
deserializers that emit any integer type as a u64. Switch the visit_u32
methods to visit_u64 methods to allow discriminants to have any size up
to a u64.
2020-09-10 23:24:33 -07:00
David Tolnay
e5b3507145
Replace serde_urlencoded link with serde_qs
2020-09-05 10:26:36 -07:00
David Tolnay
2b5b15967e
Rename TyOverby/bincode to servo/bincode
2020-08-28 15:36:51 -07:00
David Tolnay
2ef60b62ac
Release 1.0.115
2020-08-10 15:51:19 -07:00
David Tolnay
bf76f50294
Support deserializing flattened unit
2020-08-10 15:06:52 -07:00
David Tolnay
ba07075590
Support serializing flattened unit
2020-08-10 15:06:47 -07:00
David Tolnay
3022064f84
Suppress option_if_let_else clippy pedantic lint
2020-07-14 18:57:24 -07:00
David Tolnay
9e140a2071
Tweak yaml format blurb
2020-07-05 20:00:33 -07:00
Tim Hutt
010444dfa4
Allow floats to be deserialized from ints in tagged unions
2020-06-22 16:31:13 +01:00
David Tolnay
9c6f0c3a0e
Release 1.0.114
2020-06-21 17:31:02 -07:00
David Tolnay
6b3777b617
Remove len hint specialization
2020-06-20 19:02:26 -07:00
David Tolnay
7350b58f5c
Release 1.0.113
2020-06-19 13:31:38 -07:00
David Tolnay
7351e0e55a
Link to feature announcements where available
2020-06-19 13:30:14 -07:00
Robert Winslow
bb1dedf04d
Add FlexBuffers to serde ecosystem list
...
Add FlexBuffers to serde ecosystem list
2020-06-16 13:36:14 -07:00
David Tolnay
f3520e526b
Release 1.0.112
2020-06-14 11:16:04 -07:00
David Tolnay
97962d51e2
Forward serialize_entry on flattened maps
2020-06-14 11:10:18 -07:00
David Tolnay
95b1a5d3d9
Ignore unnested_or_patterns suggesting unstable code
...
Clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704
2020-06-10 19:41:16 -07:00
David Tolnay
0856a2c101
No need to specify Cargo.toml in package.include
...
Cargo.toml is always included in the published crate.
2020-06-10 01:21:19 -07:00
David Tolnay
9f331cc257
Release 1.0.111
2020-05-29 18:53:07 -07:00
David Tolnay
31fe82a215
Resolve match_wildcard_for_single_variants pedantic lint
2020-05-29 17:46:40 -07:00
David Tolnay
ef6ed1d1be
Copy some new links from serde.rs to the crate-level doc
2020-05-22 12:49:15 -07:00
David Tolnay
078b171c1b
Release 1.0.110
2020-05-09 23:06:56 -07:00
David Tolnay
b97a183e82
Release 1.0.109
2020-05-09 21:00:51 -07:00
David Tolnay
3c97e1b9a9
Format PR 1702 with rustfmt
2020-05-09 18:24:05 -07:00
ppc
a81968af3c
Turn panic to error in SystemTime serialization
2020-05-09 18:22:29 -07:00
David Tolnay
ea2789df0f
Release 1.0.108
2020-05-09 17:53:23 -07:00
David Tolnay
b7cfe33101
Add example usage to Formatter Serializer impl
2020-05-09 17:48:27 -07:00
David Tolnay
1b8ebf6b64
Add 128-bit integer support for Formatter
2020-05-09 17:48:27 -07:00
David Tolnay
35ad468780
Allow serializing newtype struct to Formatter
...
Serialize_newtype_struct is typically expected to just pass through the
wrapped value.
2020-05-09 17:48:27 -07:00
David Tolnay
850a29beb1
Directly display to the Formatter
...
This allows formatter flags to take effect.
2020-05-09 17:48:26 -07:00
David Tolnay
16bf9871cd
Remove serialize_unit from Formatter's impl
2020-05-09 17:48:26 -07:00
David Tolnay
6182eceed1
Move the Formatter Serializer to a module
...
Let's keep impls.rs for Serialize impls, which there are enough of
already.
2020-05-09 17:48:26 -07:00
David Tolnay
99bc52f685
Support no-default-features mode in Formatter's impl
2020-05-09 17:48:26 -07:00
Jethro Beekman
726ff5ed31
impl Serializer for &mut fmt::Formatter
2020-05-09 17:48:13 -07:00
David Tolnay
f63acb52dc
Release 1.0.107
2020-05-08 15:45:36 -07:00
David Tolnay
60522937af
Remove CI badge from Cargo.toml
...
Support for badges has been deprecated by crates.io.
2020-05-01 21:11:02 -07:00
David Tolnay
03addbae55
Format with rustfmt 2020-03-11
2020-04-19 17:32:11 -07:00
David Tolnay
0bab6be124
Resolve redundant_pattern_matching lint
2020-04-19 17:31:15 -07:00
David Tolnay
d1564525ad
Release 1.0.106
2020-04-03 14:26:42 -07:00
David Tolnay
e2ada0efef
Simplify default Serializer::collect_str implementation
2020-03-27 22:55:25 -07:00
David Tolnay
69653a762d
Release 1.0.105
2020-03-18 11:42:51 -07:00
Maciej Hirsz
ec6ca6bf73
Allow non-std Cow borrows
2020-03-18 13:34:38 +01:00
David Tolnay
078e88b223
Select a single docs.rs build target
2020-03-17 13:31:35 -07:00
David Tolnay
27c283ab53
Suppress wildcard import pedantic lints
2020-02-26 21:00:12 -08:00
David Tolnay
dbf1f9ab8f
Remove unneeded type ascription
2020-01-17 19:50:48 -08:00
David Tolnay
137ab48aff
Suppress unseparated_literal_suffix lint
2020-01-17 19:50:09 -08:00
James McGlashan
2a351016ed
remove the tiny bit of unsafe code
2020-01-17 00:00:00 +00:00
David Tolnay
7f799f3948
Ignore missing_errors_doc pedantic lint
2019-12-15 20:16:22 -08:00
David Tolnay
234fbfd7e3
Release 1.0.104
2019-12-15 20:01:04 -08:00
David Tolnay
b9909cef3d
Revert "Remove never_type feature gate"
...
This reverts commit 533fb9cc44
.
2019-12-15 19:52:59 -08:00
David Tolnay
43a9f59c18
Release 1.0.103
2019-11-24 16:15:13 -08:00
David Tolnay
ff70409215
Merge pull request #1669 from H2CO3/master
...
Allow untagged unit variants to deserialize from `Visitor::visit_none()`
2019-11-24 16:13:37 -08:00
David Tolnay
533fb9cc44
Remove never_type feature gate
...
The stabilization for this feature has landed in nightly.
2019-11-23 19:30:39 -08:00
Árpád Goretity
6e2c385fa5
Allow untagged unit variants to deserialize from Visitor::visit_none()
2019-11-06 17:31:27 +01:00
David Tolnay
4eb580790d
Require serde_derive version to be the same as serde version
...
Without this, Cargo could combine new serde_derive with old serde
resulting in generated code that refers to types that don't exist yet in
the serde version.
2019-11-02 15:17:09 -07:00
Ben Boeckel
6f946b20ec
serde_derive: require the same version as serde
...
This ensures that all features supported by serde are always available
through the derive macro provided through the feature flag.
Fixes : #1647
2019-11-01 19:47:31 -04:00
David Tolnay
2ceabad360
Release 1.0.102
2019-10-27 13:39:27 -07:00
David Tolnay
a00aee1495
Use a dedicated cfg for PathBuf::into_boxed_path
2019-10-27 13:38:25 -07:00
Jan Alexander Steffens (heftig)
b8772a1e40
Deserialize Box<Path> through PathBuf::into_boxed_path
...
Including Rc<Path> et al.
Fixes https://github.com/serde-rs/serde/issues/1633
2019-10-22 22:31:51 +02:00
Jan Alexander Steffens (heftig)
42990d8264
Deserialize PathBuf from bytes
...
&Path already allows this. Also complete the tests for Path/PathBuf.
2019-10-22 22:30:53 +02:00
David Tolnay
cf31418555
Resolve unused_self lint
2019-10-17 11:05:30 -04:00
David Tolnay
5db72b8ad9
Ignore must_use_candidate pedantic lint
2019-10-17 11:05:28 -04:00
David Tolnay
52f6e96ee8
Ignore needless_doctest_main lint
2019-10-08 21:15:08 -07:00
David Tolnay
4aba6fae78
Release 1.0.101
2019-09-16 00:32:28 -07:00
David Tolnay
d1ade37827
Ignore new too_many_lines lint
2019-09-10 23:15:59 -07:00
David Tolnay
0fdc0257aa
Sort Postcard in the same order as on the website
2019-09-07 19:10:48 -07:00
David Tolnay
b6a77c4413
Release 1.0.100
2019-09-07 18:55:50 -07:00
David Tolnay
c083cfd65e
Export std error type so downstream doesn't need "std" feature
2019-09-04 20:20:36 -07:00
James Munns
2d36be753a
Add Postcard to the list of Serde Data Formats
2019-08-28 12:23:54 +02:00
Benjamin Lee
b10c23a950
Fixed a typo
2019-08-18 22:37:28 -07:00
David Tolnay
192f5cd647
Release 1.0.99
2019-08-16 11:50:19 -07:00
David Tolnay
d6e5947ad2
Suppress warnings about try! macro
2019-08-16 11:24:22 -07:00
David Tolnay
690467cbe2
Release 1.0.98
2019-07-28 10:33:34 -07:00
Flaise
78c7f09e28
Add build gate for nonzero signed integers so rustc <1.34 still works
2019-07-28 11:44:31 -05:00
Flaise
34866e20a8
Add support for NonZeroI* types
2019-07-28 09:12:29 -05:00
David Tolnay
3ae2bee272
Release 1.0.97
2019-07-17 14:56:51 -07:00
David Tolnay
f249e72162
Provide try_from only on 1.34+
2019-07-17 12:21:18 -07:00
David Tolnay
92e0b62c6b
Merge pull request 1526 from fanzeyi/try_from
2019-07-17 12:16:31 -07:00
David Tolnay
cf32a5b204
Release 1.0.96
2019-07-17 12:04:19 -07:00
David Tolnay
7b0e06c825
Provide 32 bit atomic impls for emscripten
2019-07-17 11:44:24 -07:00
James Brown
01fade764c
replaced one too many _ with -
2019-07-17 09:57:53 -07:00
James Brown
210c2419be
conservatively limit atomic features
2019-07-17 09:19:03 -07:00
David Tolnay
da05163d51
Release 1.0.95
2019-07-16 10:08:53 -07:00
David Tolnay
7a4c1086b5
Emscripten does not have 64 bit atomics
2019-07-16 09:57:00 -07:00
David Tolnay
85ae57040d
One macro to deserialize all atomics
2019-07-16 07:46:44 -07:00
David Tolnay
d55a4a279f
Deserialize atomics without needing element type
2019-07-16 07:45:41 -07:00
David Tolnay
bee9299693
One macro to serialize all atomics
2019-07-16 07:42:42 -07:00
David Tolnay
9529fcec96
Serialize atomics using the primitive's Serialize impl
2019-07-16 07:40:37 -07:00
David Tolnay
bcec168e23
Centralize atomic imports
2019-07-16 07:36:16 -07:00
David Tolnay
102a332616
Format with rustfmt 2019-06-09
2019-07-16 07:32:13 -07:00
David Tolnay
637dba5c2a
Merge pull request #1572 from Roguelazer/issue-1496
...
Implement serialization and deserialization for std::sync::atomic types
2019-07-16 07:28:18 -07:00
David Tolnay
fa5c99e48a
Alloc crate is no longer unstable
2019-07-16 07:21:09 -07:00
Caio
50ebbd63c6
Enable alloc on stable
2019-07-15 14:24:03 -03:00
James Brown
4e5f63ff45
gate atomic serde on rust 1.34 or higher
2019-07-12 13:44:42 -07:00
James Brown
de709e72a8
implement deserialization for atomic integer types
2019-07-11 18:18:54 -07:00
James Brown
56d3c8f071
implement serialization for atomic integer types
2019-07-11 17:34:53 -07:00
David Tolnay
ce89adecc1
Suppress deprecation warning on mem::uninitialized
2019-07-07 21:19:50 -07:00
Andrew Gallant
f9fdd60e2e
Update docs for serde_if_integer128
...
The docs imply that the only consideration for using the
serde_if_integer128 macro is support for older versions of Rust, but
Serde's build configuration for 128-bit integers is also gated on the
target platform. For example, if Serde is being compiled for an
emscripten target, then it will not provide 128-bit integer APIs.
See also: https://github.com/BurntSushi/rust-csv/issues/158
2019-07-01 10:18:57 -04:00
David Tolnay
1c1eecabc0
Release 1.0.94
2019-06-27 10:55:12 -07:00
David Tolnay
15ee353488
IgnoredAny::visit_enum for old compilers
2019-06-27 10:45:18 -07:00
David Tolnay
e75efbfd31
Support ignoring enum with IgnoredAny
2019-06-27 10:29:55 -07:00
David Tolnay
4cb13b33e0
Release 1.0.93
2019-06-23 12:50:17 -07:00
David Tolnay
afb1754528
Allow integer key in untagged flattened map
2019-06-23 12:09:15 -07:00
David Tolnay
dbd67c6c89
Clippy const_static_lifetime lint has been renamed
2019-06-19 01:34:13 -07:00
David Tolnay
ed01bdb9dd
Remove fixed cast_precision_loss lint
2019-06-15 10:13:05 -07:00
David Tolnay
b54821d8ab
Alloc feature has been stabilized
...
warning: the feature `alloc` has been stable since 1.36.0 and no longer requires an attribute to enable
--> serde/src/lib.rs:84:40
|
84 | #![cfg_attr(feature = "alloc", feature(alloc))]
| ^^^^^
|
= note: #[warn(stable_features)] on by default
2019-05-31 21:26:43 -07:00
David Tolnay
89c6a79b6e
Suppress a new pedantic lint
2019-05-31 21:25:36 -07:00
David Tolnay
cd0412bddc
Release 1.0.92
2019-05-31 13:44:01 -07:00
David Tolnay
e42262f0f5
Provide ToString for re-export by serde::export
2019-05-31 13:42:22 -07:00
Jonas Platte
e4e110e28f
Fix a compile error in derive(Deserialize) with no_std + alloc
2019-05-31 22:16:40 +02:00
David Tolnay
0726623389
Ignore bare_trait_objects lint to support old compilers
2019-05-31 11:34:18 -07:00
est31
8fef196ee4
Don't use variable names
...
They aren't needed. This makes the macro a bit simpler
2019-05-17 16:50:41 +02:00
Zeyi Fan
4c29eea790
add attribute try_from
2019-05-11 23:31:24 -07:00
David Tolnay
6dd2b4607f
Switch to SPDX 2.1 license expression
2019-05-09 15:21:20 -07:00
David Tolnay
5cc3902ab9
Release 1.0.91
2019-05-06 16:27:04 -07:00
David Tolnay
0a9d24a218
Support deserializing enum out of MapAccessDeserializer
2019-05-06 16:11:28 -07:00
David Tolnay
e9cd73f78e
Remove link to hjson
...
This project has still not been updated to Serde 1.0.
2019-04-08 10:39:55 -07:00
David Tolnay
0be7f36d51
Release 1.0.90
2019-04-03 09:41:38 -07:00
David Tolnay
b811588fa0
Release 1.0.89
2019-02-28 17:09:10 -08:00
David Tolnay
5fcdf0ff2b
Sort version-conditional imports at the bottom
2019-02-28 16:53:13 -08:00
David Tolnay
650b723da3
Format with rustfmt 2019-02-14
2019-02-28 16:40:54 -08:00
David Tolnay
97920be33a
Merge pull request #1486 from vorot93/reverse
...
impl Serialize and Deserialize for core::cmp::Reverse
2019-02-28 16:39:54 -08:00
David Tolnay
535e3d4372
Mention rc feature in list of trait impls in documentation
2019-02-28 01:13:36 -08:00
Artem Vorotnikov
71fe2a5534
Reverse impls available for Rust >=1.19
2019-02-20 12:56:35 +03:00
Artem Vorotnikov
f3ffcfd61e
impl Serialize and Deserialize for core::cmp::Reverse
2019-02-20 04:32:55 +03:00
David Tolnay
344602d27e
Make array ser impls macro better fit rustfmt style
2019-02-16 15:22:53 -08:00
David Tolnay
64c483cf80
Release 1.0.88
2019-02-15 19:55:50 -08:00
David Tolnay
19091aacc7
Fix mistaken double negative in flatten error message
2019-02-15 18:56:31 -08:00
David Tolnay
134f268cee
Release 1.0.87
2019-02-04 07:08:41 +01:00
David Tolnay
c8e3959435
Release 1.0.86
2019-02-01 21:07:19 -08:00
David Tolnay
796f412a1e
Document that Bound<T> impls exist
2019-02-01 21:07:18 -08:00
David Tolnay
fa854a2108
Format with rustfmt 2018-12-10
2019-02-01 21:04:08 -08:00
David Tolnay
3a097ff2d2
Deserialize Bound::Unbounded as unit variant
2019-02-01 21:04:07 -08:00
David Tolnay
8463bfc1e5
Remove as yet unrequested range impls
2019-02-01 21:04:06 -08:00
David Tolnay
7a72b4c624
Merge pull request #1466 from 0nkery/master
...
Impl Serialize/Deserialize for std::ops::{Bound, RangeFrom, RangeTo, RangeToInclusive}
2019-02-01 21:03:55 -08:00
David Tolnay
670c179417
Re-enable deny unused_imports
2019-02-01 17:56:52 -08:00
David Tolnay
1b1d868837
Combine the two clippy lists
2019-02-01 17:56:31 -08:00
David Tolnay
d9704d02bb
Remove clippy lints that are no longer triggering
2019-02-01 17:53:14 -08:00
David Tolnay
1349548367
Fix indentation of cfg that isn't formatted by rustfmt
2019-02-01 17:48:14 -08:00