Commit Graph

2174 Commits

Author SHA1 Message Date
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
David Tolnay
ef4dd6c0ec
Update to syn 0.12 2018-01-09 19:05:08 -08:00
David Tolnay
f7ed967db1
Merge pull request #1135 from mcgoo/appveyor-tls
get rustup-init with curl to avoid tls failures
2018-01-04 20:55:53 -08:00
mcgoo
613e46b0ee
get rustup-init with curl to avoid tls failures 2018-01-04 22:04:16 -06:00
David Tolnay
b2d2e96267
Merge pull request #1133 from martinlindhe/master
fix some typos
2018-01-03 07:44:40 -08:00
Martin Lindhe
ae0373643c fix some typos 2018-01-03 15:16:45 +01:00
David Tolnay
7aeabddd2f
Release 1.0.27 2017-12-30 22:19:41 -05:00
David Tolnay
9df8f5ecc0
Merge pull request #1132 from Lireer/uppercase
Add UPPERCASE to rename_all
2017-12-30 22:18:20 -05:00
Carl Scherer
c4fad2883b Add UPPERCASE to rename_all 2017-12-31 03:12:00 +01:00
David Tolnay
9cfcd78c87
Release 1.0.26 2017-12-27 17:33:32 -05:00
David Tolnay
4751627f1c
Implement De/Serialize for PhantomData where T: ?Sized 2017-12-27 17:32:49 -05:00
David Tolnay
ae59c6b6d2
Release 1.0.25 2017-12-23 23:33:59 -05:00
David Tolnay
4973d7a62d
Suppress errors on rustfmt line overflow
Some of the serde_derive lines inside of quote!(...) are too long. Rustfmt
cannot fix these. Will need to follow up.
2017-12-23 20:27:56 -08:00
David Tolnay
ed6a1de311
Auto format attributes on their own line 2017-12-23 20:24:57 -08:00
David Tolnay
ab234be025
The rustfmt rfc style is now the default 2017-12-23 20:21:52 -08:00
David Tolnay
ee75e6c0e9
Format with rustfmt-nightly 0.3.4 2017-12-23 20:17:52 -08:00
David Tolnay
c2b390fe63
Merge pull request #1124 from serde-rs/in-place
Rename deserialize_from to deserialize_in_place
2017-12-23 19:56:29 -08:00
David Tolnay
56d5d7f761
Rename deserialize_from to deserialize_in_place 2017-12-17 10:46:44 -08:00
David Tolnay
0b89bc920e
Merge pull request #1094 from Gankro/deserialize_from
Add and derive deserialize_from
2017-12-11 21:29:15 -08:00
David Tolnay
0dac13e4db
Resolve conflict with pr 1115 2017-12-11 20:59:54 -08:00
David Tolnay
0c2e91f28a
Merge branch serde-rs/master into Gankro/deserialize_from 2017-12-11 20:49:23 -08:00
David Tolnay
13e7bee0e6
Eliminate need for unwrap in deserialize_from_seq 2017-12-11 18:13:13 -08:00
David Tolnay
65104aca9c
Remove need for allow(unreachable_code) 2017-12-11 17:55:23 -08:00
David Tolnay
9360094ba7
Revert main_body naming change
The naming here isn't great but no need to change it in this PR.
2017-12-10 23:19:31 -08:00
David Tolnay
3700779bfa
More meaningful names and types for nop_reserve 2017-12-10 23:18:08 -08:00
David Tolnay
d9e894911f
Move all the deserialize_from derive code behind flag 2017-12-10 23:15:14 -08:00
David Tolnay
85e3ddc2b8
Less indentiation in deserialize_from_body 2017-12-10 23:04:44 -08:00
David Tolnay
ccae35d92a
Do not emit deserialize_from if every field has deserialize_with 2017-12-10 22:55:28 -08:00
David Tolnay
61ca928325
Can never see getters in a deserialize_from 2017-12-10 22:46:46 -08:00
David Tolnay
a93f2ebff0
Enable deserialize_from in the test suite 2017-12-10 22:46:25 -08:00
David Tolnay
a45f1ae915
Remove unused dev-dependency of serde_test on deserialize_from 2017-12-10 22:02:11 -08:00
David Tolnay
9641978481
Hide deserialize_from 2017-12-10 21:55:07 -08:00
David Tolnay
ffd2017c6f
Use the default deserialize_from for Option<T>
The custom one was functionally identical to the default implementation given by
the Deserialize trait. If someone has benchmarks that the custom one performs
better, we can put it back.
2017-12-10 21:27:44 -08:00
David Tolnay
b7eb42aa6b
Release 1.0.24 2017-12-09 14:43:55 -08:00
David Tolnay
750f8ba299
Clean up trailing whitespace 2017-12-09 14:42:59 -08:00
David Tolnay
49cdef074d
Merge pull request #1115 from Binero/master
Solved #1105.
2017-12-08 08:57:31 -08:00
Jeroen Bollen
aa86b04714 Adressed concerns raised by @oli-obk.
Specifically:
 - Change identation in `de.rs`.
 - Make `attr::Field` take a `attr::Default` as opposed to the entire parent `attr::Container`.
2017-12-08 15:13:05 +01:00
Jeroen Bollen
c887a0b472 Solved #1105.
When a field should be skipped during deserialization, it will not use its own Default implementation
when the container structure has `#[serde(default)]` set.
2017-12-06 21:14:02 +01:00
Alexis Beingessner
34936be574 test deserialize_from 2017-12-04 13:29:03 -05:00
Alexis Beingessner
e354dd0c7f Derive deserialize_from for tuples and structs
This adds a new "deserialize_from" feature (default off) that opts into
deriving deserialize_from with #[derive(Deserialize)].
2017-12-04 13:23:26 -05:00
Alexis Beingessner
bc221abb04 Augment builtin std/core Deserialize impls to implement deserialize_from 2017-12-04 13:23:26 -05:00
Alexis Beingessner
ab5e8780ab Add deserialize_from to Deserialize 2017-12-04 13:23:26 -05:00
David Tolnay
0c34e06e51
Merge pull request #1106 from khuey/inlines
Inline various deserialization helper methods.
2017-12-02 15:57:07 -08:00
Kyle Huey
4a0c4e0c25 Mark size_hint::cautious as inline. 2017-12-01 14:31:52 -08:00
David Tolnay
8c34e0940f
Release 1.0.23 2017-11-29 22:26:32 -08:00
David Tolnay
eb6bf16a51
Revert "Catch wrong field names length in serde_test"
There are at least two reasonable things to expect the len field to
check: the length of the fields array passed to deserialize_struct, or
the number of field tokens. Even beyond these, in some cases it can be
useful to test deserialization with a bogus len to test how the
Deserialize impl reacts to an incorrect size_hint.

This reverts commit 436cafb0a3 which was
released in serde_test 1.0.20.
2017-11-29 22:21:05 -08:00
David Tolnay
797d049db5
Release 1.0.22 2017-11-29 20:01:43 -08:00
David Tolnay
d61a373f12
Merge pull request #1104 from serde-rs/abs
Fix missing absolute paths in deserialize_seq
2017-11-29 19:58:21 -08:00