Commit Graph

86 Commits

Author SHA1 Message Date
David Tolnay
b9909cef3d
Revert "Remove never_type feature gate"
This reverts commit 533fb9cc44.
2019-12-15 19:52:59 -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
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
Jake Kiesel
acc8640c1e Fix (de)serialization of new types where the internal type is skipped 2019-09-07 03:20:43 -06:00
David Tolnay
7b0e06c825
Provide 32 bit atomic impls for emscripten 2019-07-17 11:44:24 -07:00
David Tolnay
f3e2bb5104
Disable 64 bit atomic tests on emscripten 2019-07-16 10:00:44 -07:00
David Tolnay
e89feb9635
Test atomics without needing a macro
As a secondary benefit, this avoids a congnitive_complexity lint from
Clippy.
2019-07-16 09:17:36 -07:00
David Tolnay
5f72766c27
Ignore unreadable_literal lint in test code 2019-07-16 09:04:43 -07:00
David Tolnay
102a332616
Format with rustfmt 2019-06-09 2019-07-16 07:32:13 -07: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
David Tolnay
fccd3e9fba
Add deserialization tests for IgnoredAny 2019-06-27 10:07:06 -07:00
David Tolnay
fa854a2108
Format with rustfmt 2018-12-10 2019-02-01 21:04:08 -08:00
David Tolnay
8463bfc1e5
Remove as yet unrequested range impls 2019-02-01 21:04:06 -08:00
Dmitry Shlagoff
0def7da5a8 Impl Ser/De for RangeFrom, RangeTo, RangeToInclusive 2019-01-29 20:29:14 +07:00
Dmitry Shlagoff
4bb45c8252 Impl Serialize for Bound<T> 2019-01-29 15:20:27 +07:00
David Tolnay
727a40fc5a
Update test suite to use tool attrs 2018-12-31 21:59:40 -05:00
David Tolnay
294dccc5be
Update test suite to 2018 edition 2018-12-31 21:53:37 -05:00
David Tolnay
58b3af4c29
Copyright/license headers
The following changes are included:

- Delete per-file license notices at the top of each file.
- Delete the first paragraph of LICENSE-MIT (an inaccurate
  pseudo-copyright line), leaving only the text of the MIT license.

Nothing about the license of Serde code has changed, only our
understanding of how to correctly communicate that license has changed.

This mirrors an equivalent change being applied in the rust-lang/rust
repository.
2018-11-24 15:53:09 -08:00
David Tolnay
9afc5fef11
Format with rustfmt 1.0.0-nightly 2018-11-21 01:13:17 -08:00
David Tolnay
f1e8dcf38e
Run test suite on asmjs 2018-09-15 15:25:55 -07:00
David Tolnay
66a9ccb10e
Ignore renamed_and_removed_lints lint
The recommended replacement involving clippy::all has not been
stabilized yet.
2018-09-11 23:05:33 -07:00
David Tolnay
53fe1b328e
Format with rustfmt 0.99.4 2018-09-11 23:00:08 -07:00
roblabla
7870b58356 Add tests for serde(other) in enum 2018-09-10 16:25:02 +00:00
David Tolnay
d0464fbff7
Add Emscripten build in Travis 2018-09-02 12:34:13 -07:00
David Tolnay
28db9d4989
Format with rustfmt 0.99.1 2018-08-06 22:40:28 -07:00
Caio
8b2e6baf78 Implement Serialize and Deserialize for RangeInclusive 2018-08-05 10:45:50 -03:00
David Tolnay
4e54aaf796
Format with rustfmt 0.8.2 2018-07-08 19:02:44 -07:00
David Tolnay
94853752a1
Stabilize some unstable tests in test suite 2018-06-03 00:31:20 -07:00
David Tolnay
22b1af7eb3
Test never_type 2018-06-03 00:22:11 -07:00
David Tolnay
9083cf4b00
Test integer128 impls 2018-05-20 22:17:35 -07:00
David Tolnay
4687c1b52b
Test Weak deserialize impls 2018-05-07 11:23:18 -07:00
David Tolnay
d82d1707d6
Format with rustfmt 0.6.0 2018-04-30 01:42:46 -07: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
9db784bccd
Ignore decimal_literal_representation in test suite 2018-01-29 21:52:21 -08:00
David Tolnay
1bdf5ecec4
Ignore unused_parens warning on the proc macro workaround 2018-01-21 17:54:06 -08:00
David Tolnay
6e01f220b1
Ignore clippy flagging our workaround 2018-01-13 14:28:12 -08:00
David Tolnay
ed6a1de311
Auto format attributes on their own line 2017-12-23 20:24:57 -08:00
David Tolnay
ee75e6c0e9
Format with rustfmt-nightly 0.3.4 2017-12-23 20:17:52 -08:00
David Tolnay
0dac13e4db
Resolve conflict with pr 1115 2017-12-11 20:59:54 -08: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
David Tolnay
436cafb0a3
Catch wrong field names length in serde_test 2017-11-12 10:16:43 -08:00
Markus Westerlind
aad7a7987f Add an example to the Configure trait 2017-11-06 10:35:22 +01:00
David Tolnay
ab0848f780
Follow clippy advice about unreadable literal 2017-10-31 22:42:12 -07:00
David Tolnay
9b08915a18
Add tests for std::num::Wrapping impls 2017-10-31 09:32:58 -07:00
David Tolnay
9be3d32016
Remove redundant readable/compact tests
This functionality is covered well enough by the std::net types.
2017-10-17 23:16:21 -07:00
David Tolnay
5daf1b89a1
Consolidate readable/compact deserialization tests 2017-10-17 23:15:35 -07:00
David Tolnay
f8f5d0ca2f
No need for readable setting for the ignore test 2017-10-17 23:09:50 -07:00
David Tolnay
4ed0362c8e
Panic by default in serde_test is_human_readable
The serde_test Serializer and Deserializer panic in is_human_readable unless the
readableness has been set explicitly through one of the hidden functions. This
is to force types that have distinct readable/compact representations to be
tested explicitly in one or the other, rather than with a plain assert_tokens
which arbitrarily picks one.

We need to follow up by designing a better API in serde_test to expose this
publicly. For now serde_test cannot be used to test types that rely on
is_human_readable. (The hidden functions are meant for our test suite only.)
2017-10-17 09:49:42 -07:00