David Tolnay
2e597ed3f0
Remove unused functions in with-variant tests
...
Macro expansion fails before it would generate code to call any of these.
2017-09-09 10:58:32 -07:00
David Tolnay
15b2714058
Merge pull request #1015 from spinda/with-variant
...
implement (de)serialize_with for variants
2017-09-09 10:49:24 -07:00
David Tolnay
9ce107de25
Merge pull request 963 from sfackler/u64-identifier
...
Conflicts:
serde_derive/src/de.rs
2017-09-08 21:35:41 -07:00
David Tolnay
e47284c0e0
Merge pull request #1043 from greyblake/screaming-kebab-case
...
SCREAMING-KEBAB-CASE support
2017-09-08 21:30:01 -07:00
Steven Fackler
95407a4ca5
Support field ident deserialization from u32
2017-09-05 21:55:33 -07:00
Sergey Potapov
e67d941b78
Support for SCREAMING-KEBAB-CASE
2017-09-05 22:07:08 +02:00
David Tolnay
972da59ebc
Deserialize unsized Arc and Rc
2017-09-04 10:56:42 -07:00
David Tolnay
e4ea2a56e9
Serialize unsized Arc and Rc
2017-09-04 10:31:03 -07:00
Michael Smith
552971196d
Fix Clippy errors in variant serialize_with tests
2017-08-16 12:04:39 -07:00
David Tolnay
0681cd5003
Replace deprecated compiletest::default_config()
2017-08-15 22:10:18 -07:00
David Tolnay
d965367238
No longer need feature(into_boxed_c_str)
2017-08-15 22:08:23 -07:00
Michael Smith
9fc180e62f
Implement deserialize_with for variants
...
Complements variant serialize_with and closes #1013 .
2017-08-14 14:41:05 -07:00
Michael Smith
5b815b7001
Implement serialize_with for variants
...
As discussed in #1013 , serialize_with functions attached to variants receive an
argument for each inner value contained within the variant. Internally such a
function is wired up to the serializer as if the variant were a newtype variant.
2017-08-14 11:17:08 -07:00
David Tolnay
f36a1e0895
Inherit the visibility of remote struct definition
2017-07-25 23:52:06 -07:00
David Tolnay
4f2e8d5dbb
Workaround for "no bin target named serde_derive_tests_no_std"
2017-07-21 00:05:30 -07:00
Markus Westerlind
85bccf42b6
Fix SystemTime serialization test on Windows
...
Windows's `SystemTime` do not have nanosecond resolution which caused the test duration to be truncated b1363a73ed/src/libstd/sys/windows/time.rs (L177)
2017-07-16 12:16:07 +02:00
David Tolnay
fa9057fa31
Merge pull request #949 from WiSaGaN/feature/support-system-time
...
Support std::time::SystemTime
2017-07-11 21:17:56 -07:00
Wangshan Lu
0084d82a50
Add tests for SystemTime
2017-07-12 12:01:40 +08:00
David Tolnay
775e8154e7
Fix libc dependency in no_std test
2017-07-09 10:19:19 -07:00
David Tolnay
9c679d9082
Test for serializing BTreeSet
2017-07-09 10:16:49 -07:00
David Tolnay
b0f9d2a0ba
Exclude macros file from being tested by itself
2017-07-09 09:24:29 -07:00
David Tolnay
f39b1db96a
Additional errors for some reason
2017-07-09 09:22:20 -07:00
David Tolnay
1d3e921ba6
Fix deserializer bounds on remote derive
2017-06-29 20:12:44 -07:00
Steven Fackler
8e8694261b
Fix identifier deserialization from non-u32
...
Closes #962
2017-06-19 20:23:14 -07:00
David Tolnay
4fdba725fe
Revert "Support deserialization of struct keys from integers"
...
This is not as useful as expected because the Serializer does not know the real
index of each struct field being serialized. The best it can do is keep a
counter, which goes wrong if fields are conditionally skipped.
This reverts commit eec7101894
.
2017-06-18 09:11:21 -07:00
Steven Fackler
eec7101894
Support deserialization of struct keys from integers
...
serde-cbor supports a "packed" serialization flag which causes keys to
be serialized as their indices, but the deserializer currently has to
hardcode support for this format. We can simply support deserialization
of struct keys from integers as we already do for enum variants.
2017-06-17 18:12:07 -07:00
spikefoo
1669c69714
Add a combined #serde[(skip)]
field attribute
2017-05-16 12:33:26 +03:00
David Tolnay
cda1fc46b0
Fix internally tagged struct variant containing unit variant containing borrowed string
2017-05-14 12:39:42 -07:00
David Tolnay
c1259fbc87
Support borrowing within internally tagged enum
2017-05-10 19:56:05 -07:00
Paul Collier
f347b2d363
impl Deserialize for &'a Path
2017-05-10 13:03:03 -04:00
Ted Driggs
2440b59aae
Address feedback on PR #905
...
* Added error test when deny_unknown_fields enabled
* Fixed next_relevant_key to use absolute paths
2017-04-27 12:21:32 -07:00
Ted Driggs
873cfbe9ab
Fix #816 - adjacently-tagged enums honor deny_unknown_fields
2017-04-27 11:24:09 -07:00
David Tolnay
2d465415c5
Take credit
2017-04-20 08:13:46 -07:00
David Tolnay
15341780a2
Use struct variants in test suite
2017-04-19 13:06:31 -07:00
David Tolnay
26a6ba177c
Remove error from serde_test public API
2017-04-19 11:54:48 -07:00
David Tolnay
86deb8db79
Remove seq_fixed_size in favor of tuple
2017-04-17 12:07:49 -07:00
David Tolnay
cdfd445528
Generate deserialize impls for identifiers
2017-04-14 21:53:48 -07:00
David Tolnay
3f920f645c
License boilerplate
2017-04-13 17:34:42 -07:00
David Tolnay
ea8fb97beb
Format in rfc style
2017-04-13 12:32:29 -07:00
David Tolnay
0d82bbf74f
Rename ValueDeserializer trait to IntoDeserializer
2017-04-11 23:20:35 -07:00
David Tolnay
517270a943
Merge pull request #858 from serde-rs/remote
...
Derive for remote types
2017-04-10 12:33:38 -07:00
David Tolnay
6a6606cd64
Test unknown field in remote struct
2017-04-10 12:23:02 -07:00
David Tolnay
174867295b
Test missing field in remote struct
2017-04-10 12:22:51 -07:00
David Tolnay
ad5bf04c4e
Test for incorrect remote type deserializing
2017-04-10 12:15:40 -07:00
David Tolnay
2deacf8eaa
Detect incorrect remote type without getter
2017-04-10 12:12:00 -07:00
David Tolnay
e133b8b708
Fix unused import on windows
2017-04-09 14:11:27 -07:00
David Tolnay
78f682590a
Merge branch 'origin/1.0' into 'origin/remote'
...
Conflicts:
serde_derive/src/de.rs
2017-04-09 13:19:04 -07:00
David Tolnay
1986c17052
Remove conversion from empty seq to unit struct
2017-04-09 13:08:05 -07:00
David Tolnay
5ec317a899
More compile-fail tests for remote derive
2017-04-09 11:11:27 -07:00
David Tolnay
9d8987bde8
Require getters to return the correct type
2017-04-09 10:59:54 -07:00