Jan Michael Auer
5457394f5b
Fixed various issues with combinding flatten and deny_unknown_fields
2018-03-16 23:05:48 +01:00
Jan Michael Auer
6627540dd6
Added support basic deserialization in derive
2018-03-16 23:05:48 +01:00
Jan Michael Auer
5ae06bba49
Store flatten flag in container attributes
2018-03-16 23:05:47 +01:00
Jan Michael Auer
571bb8caed
Derive serialization for serde(flatten)
2018-03-16 23:05:47 +01:00
Jan Michael Auer
299cd2dbd0
Replace unknown_fields_into with serde(flatten)
2018-03-16 23:05:47 +01:00
Armin Ronacher
583c0d8d14
Make proc-macro2/nightly happy
2018-03-16 23:05:22 +01:00
Armin Ronacher
07d07347b3
Make clippy happy
2018-03-16 23:05:22 +01:00
Armin Ronacher
77b07f3fbf
Added tests for unknown_fields_into
2018-03-16 23:05:22 +01:00
Armin Ronacher
1bd2c6129c
Explicitly pass value requirements for the capture path
2018-03-16 23:05:22 +01:00
Armin Ronacher
39413c8ce7
Implement deserializer for map mode and collection fields
2018-03-16 23:05:22 +01:00
Armin Ronacher
b4dbae250b
Added support for serialization of structs as maps
2018-03-16 23:05:22 +01:00
Armin Ronacher
5a91ac5ba5
Initial work on supporting structs as map with unknown field collection
2018-03-16 23:05:22 +01:00
David Tolnay
7ad836e6a9
Release 1.0.33
2018-03-15 10:03:42 -07:00
David Tolnay
72ecb9064c
Fix parsing of qself in paths in attributes
2018-03-15 10:02:40 -07:00
David Tolnay
23c6eb3b40
Release 1.0.32
2018-03-13 11:31:26 -07:00
David Tolnay
b8c9a66d75
Release 1.0.31
2018-03-13 10:18:35 -07:00
David Tolnay
56b2e39dda
Fix panic when a reference has unspecified lifetime
...
This will fail later in compilation anyway, but serde_derive needs to
not crash before then.
#[derive(Deserialize)]
struct A {
field: &str,
}
error[E0106]: missing lifetime specifier
--> src/main.rs
|
| field: &str,
| ^ expected lifetime parameter
2018-03-13 09:56:38 -07:00
David Tolnay
5bc805329e
Drop impl should only panic if not already panicking
2018-03-13 09:42:07 -07:00
David Tolnay
69dd3215f4
Release 1.0.30
2018-03-12 11:44:50 -07:00
David Tolnay
a7a7a31809
Merge pull request #1175 from daboross/fix-borrowed-cow-bytes
...
Fix borrowed Cow<'_, [u8]> deserializing as str.
2018-03-12 11:44:14 -07:00
David Ross
af9996aa9a
Fix borrowed Cow<'_, [u8]> deserializing as str.
...
This changes the deserialize implementation for a borrowed Cow<[u8]>
to specifically request a byte slice, rather than a borrowed string.
The old behavior breaks any program which relies on data being
deserialized the same way as it was serialized and uses Cow<[u8]>.
In serde_json, it just wouldn't deserialize. In bincode, it
deserialized normally unless the bytes were invalid UTF8.
Fixes https://github.com/TyOverby/bincode/issues/231 .
2018-03-12 11:26:11 -07:00
David Tolnay
0d4d47c398
Release 1.0.29
2018-03-09 00:24:08 -08:00
David Tolnay
30361ac6d0
Clean up workaround that required too many parentheses
...
The issue has been fixed in the compiler and these extra call site parentheses
are no longer required.
2018-03-09 00:22:27 -08:00
David Tolnay
3f75239bfb
Release 1.0.28
2018-03-08 11:39:32 -08:00
David Tolnay
8dd5605a40
Merge pull request #1170 from H2CO3/disallow_internal_tag_conflict
...
Disallow variant field names to conflict with tag of internally-tagged enum
2018-03-08 09:34:27 -08:00
David Tolnay
f288a41768
Test the new errors on conflicting enum tags
2018-03-08 09:31:25 -08:00
Árpád Goretity
f4b78e202a
add a check for conflicting adjacent tags as well
2018-03-08 09:57:05 +01:00
Árpád Goretity
0ddebe0317
More descriptive function name; add doc comment to function
2018-03-08 01:05:19 +01:00
Árpád Goretity
9fc526b788
be more explicit in match for future-proofing code via exhaustiveness check
2018-03-08 00:53:56 +01:00
Árpád Goretity
a799ea171c
Disallow variant field names to conflict with tag of internally-tagged enum
2018-03-08 00:43:35 +01:00
David Tolnay
d6f07f2f47
Ignore redundant_field_names lint
2018-02-27 11:13:26 -08:00
David Tolnay
8bba8447ef
Whitelist some new clippy lints
2018-02-05 10:27:04 -08:00
David Tolnay
9db784bccd
Ignore decimal_literal_representation in test suite
2018-01-29 21:52:21 -08:00
David Tolnay
9317bc5afa
Address clippy lints in serde_derive_internals
2018-01-26 00:22:38 -08:00
David Tolnay
a185df1e77
Ignore decimal_literal_representation lint
...
The number 4096 is used to cap the size of collections that we preallocate.
cmp::min(hint.unwrap_or(0), 4096)
I find this number more understandable than 0x1000.
2018-01-26 00:19:26 -08:00
David Tolnay
1bdf5ecec4
Ignore unused_parens warning on the proc macro workaround
2018-01-21 17:54:06 -08:00
David Tolnay
59017aa19b
Follow clippy's replace_consts lint
2018-01-15 17:40:32 -08:00
David Tolnay
6b4625dcbb
Ignore warning in no_std test
2018-01-13 14:43:34 -08:00
David Tolnay
6e01f220b1
Ignore clippy flagging our workaround
2018-01-13 14:28:12 -08:00
David Tolnay
64573319f9
Meaningful spans when invoking deserializer trait methods
2018-01-10 20:59:48 -08:00
David Tolnay
3d64df6e87
Meaningful span for attrs parsed from string literal
2018-01-10 19:59:49 -08:00
David Tolnay
cc2558b0dc
Meaningful spans when invoking serializer trait methods
2018-01-10 19:22:07 -08:00
David Tolnay
5c41661bce
Merge pull request #1140 from serde-rs/hygiene
...
Hygiene fixes
2018-01-09 22:39:23 -08:00
David Tolnay
dd6914a203
Build the test suite in CI using proc-macro2/nightly
2018-01-09 22:23:19 -08:00
David Tolnay
63623eb3b3
Hygiene fixes
2018-01-09 22:22:08 -08:00
David Tolnay
ddc4b50d4d
Use call_site in 'with' attribute
2018-01-09 20:34:29 -08:00
David Tolnay
b313f947dc
Use call_site as the span of unnamed member access
2018-01-09 20:28:23 -08:00
David Tolnay
16bc9fb99e
Address clippy lints in serde_derive
2018-01-09 19:40:34 -08:00
David Tolnay
34eaab00f7
Address clippy lints in serde_derive_internals
2018-01-09 19:40:33 -08:00
David Tolnay
6024e717fb
Merge pull request #1138 from serde-rs/syn
...
Update to syn 0.12
2018-01-09 19:23:19 -08:00