Commit Graph

2456 Commits

Author SHA1 Message Date
David Tolnay
b4e51fcc77
Respect skip_serializing in tuple structs and variants 2018-05-08 11:37:52 -07:00
David Tolnay
be7fe2a5eb
Introduce bound attribute on enum variants 2018-05-08 11:16:10 -07:00
David Tolnay
b4076f4577
Release 1.0.51 2018-05-08 10:07:45 -07:00
David Tolnay
c4181f46be
Respect variant skip attribute in inferred bounds 2018-05-07 21:30:00 -07:00
David Tolnay
8c0efc3d77
Add a variant skip attribute 2018-05-07 21:27:34 -07:00
David Tolnay
7e3efaf6c5
Improve error when a 'de lifetime parameter already exists 2018-05-07 21:15:44 -07:00
David Tolnay
12fe42ed45
Support empty adjacently tagged enum 2018-05-07 21:02:42 -07:00
David Tolnay
7cd4f49c76
Release 1.0.50 2018-05-07 13:51:32 -07:00
David Tolnay
ff9c85d47f
Merge pull request #1252 from serde-rs/precondition
Detect deserialize on a struct ending in dynamically sized slice
2018-05-07 13:50:48 -07:00
David Tolnay
0025ef9aba
Detect deserialize on a struct ending in dynamically sized slice 2018-05-07 11:52:59 -07:00
David Tolnay
536bdd77a0
Release 1.0.49 2018-05-07 11:51:15 -07:00
David Tolnay
6993b983d2
Merge pull request #1251 from serde-rs/weak
Add impls for Weak
2018-05-07 11:50:35 -07:00
David Tolnay
4bfeb05f22
Prefer Self and associated types in de impls 2018-05-07 11:36:41 -07:00
David Tolnay
4687c1b52b
Test Weak deserialize impls 2018-05-07 11:23:18 -07:00
David Tolnay
a58abae193
Test Weak serialize impls 2018-05-07 11:23:17 -07:00
David Tolnay
0bc9c729b3
Add impls for Weak 2018-05-07 11:23:16 -07:00
David Tolnay
dc921892be
Eliminate map_or(None, f) 2018-05-07 11:23:04 -07:00
David Tolnay
62557731c3
Enable pedantic clippy lints in serde_derive 2018-05-07 11:03:09 -07:00
David Tolnay
ab62cd3b28
Eliminate loop that does not loop 2018-05-07 10:46:54 -07:00
David Tolnay
30824e9f61
Release 1.0.48 2018-05-07 10:22:26 -07:00
David Tolnay
eecc0870fc
Test for pub(restricted) 2018-05-06 23:22:27 -07:00
David Tolnay
6475e73b05
Less horrible logic for missing fields that unconditionally return error 2018-05-06 22:20:35 -07:00
David Tolnay
697234517d
Merge pull request #1249 from serde-rs/empty
Fix adjacently tagged empty tuple variant or struct variant
2018-05-06 22:20:27 -07:00
David Tolnay
3cd9d071c2
Fix adjacently tagged empty tuple variant or struct variant 2018-05-06 21:50:40 -07:00
David Tolnay
9dc05c36f0
Release 1.0.47 2018-05-06 21:39:21 -07:00
David Tolnay
972cc06fed
Format the flatten tests using rustfmt 0.6.1 2018-05-06 21:38:41 -07:00
David Tolnay
20013464f8
Merge pull request #1248 from serde-rs/flatten
Support flatten in enums
2018-05-06 21:37:32 -07:00
David Tolnay
2009b4da5f
Remove old flatten in enum compile-fail test 2018-05-06 21:26:40 -07:00
David Tolnay
0b72c86a35
Add tests for flatten in enums 2018-05-06 21:23:20 -07:00
David Tolnay
94b857057b
Support deserializing enums containing flatten 2018-05-06 20:41:02 -07:00
David Tolnay
979df3427b
Support serializing enums containing flatten 2018-05-06 20:14:35 -07:00
David Tolnay
978d64993e
Allow flatten attribute in enums 2018-05-06 20:14:28 -07:00
David Tolnay
5098609935
Release 1.0.46 2018-05-06 13:44:55 -07:00
David Tolnay
6374467f02
Merge pull request #1245 from serde-rs/flat
Support deserializing a flattened internally tagged enum
2018-05-06 13:43:44 -07:00
David Tolnay
1f9fc61b98
Merge pull request #1246 from serde-rs/internals
Move derive internals into serde_derive crate
2018-05-05 23:58:41 -07:00
David Tolnay
3859f58d9b
Move derive internals into serde_derive crate
We can continue to publish serde_derive_internals independently but
serde_derive no longer has a dependency on it. This improves compile
time of serde_derive by 7%.
2018-05-05 23:46:30 -07:00
David Tolnay
aac1c65033
Simplify implementation of flattened internally tagged enum
The fact that the tag entry is consumed was only observable if there is
a later flattened map field, at which point the behavior is already
confusing anyway.

    #[derive(Deserialize)]
    struct Example {
        #[serde(flatten)]
        a: InternallyTagged,
        #[serde(flatten)]
        rest: BTreeMap<String, Value>,
    }

Before this simplification the map would receive all the fields of the
internally tagged enum but not its tag, after it receives all the fields
including the tag.
2018-05-05 22:30:46 -07:00
David Tolnay
d8120e19bc
Support deserializing a flattened internally tagged enum 2018-05-05 21:52:16 -07:00
David Tolnay
ed425b3a6f
Clean up indentation in VariantAccess doc 2018-05-05 18:40:28 -07:00
David Tolnay
d1297deb36
Format where-clauses in serde docs like rustfmt 2018-05-05 18:33:33 -07:00
David Tolnay
f263e3fcec
Format serde_derive generated where-clauses 2018-05-05 18:24:16 -07:00
David Tolnay
40479336c1
Format serde_test doc where-clauses in the style of rustfmt 2018-05-05 18:20:26 -07:00
David Tolnay
6ca4dd2c4a
Add an issue suggestion for documentation improvements 2018-05-05 10:01:54 -07:00
David Tolnay
c04c233838
Generalize the help issue type 2018-05-05 10:00:17 -07:00
David Tolnay
175c638fdc
Set up some issue templates 2018-05-05 01:45:24 -07:00
David Tolnay
97eff8e875
Format with rustfmt 0.6.1 2018-05-05 00:56:12 -07:00
David Tolnay
47676cdb49
Clean up references to Ident 2018-05-05 00:45:30 -07:00
David Tolnay
93bddb361e
Fix toplevel_ref_arg lint 2018-05-05 00:39:26 -07:00
David Tolnay
adb1c9540d
Remove a layer of wrapping in deserialize_with untagged newtype variant 2018-05-05 00:25:27 -07:00
David Tolnay
0e1d065402
Format with rustfmt 0.6.1 2018-05-05 00:18:21 -07:00