Commit Graph

2779 Commits

Author SHA1 Message Date
David Tolnay
eb7250792b
Format with rustfmt 2018-12-10 2018-12-28 12:19:32 -05:00
David Tolnay
7e5066b878
Merge pull request #1450 from motu42/master
Bug fix to support the tag attribute on braced structs with zero fields
2018-12-27 21:48:14 -05:00
Johannes Willbold
889e17816f Bug fix for #1449
Modified serialize_struct_as_struct.
Added test test_internally_tagged_braced_struct_with_zero_fields
2018-12-28 02:50:24 +01:00
David Tolnay
b1b9702daf
Release 1.0.83 2018-12-27 19:53:48 -05:00
David Tolnay
32728d2f1d
Format with rustfmt 2018-12-10 2018-12-27 19:52:26 -05:00
David Tolnay
807a097387
Fix spelling in ui test name 2018-12-27 19:51:53 -05:00
David Tolnay
794ee15386
Merge pull request #1448 from motu42/master
Allow #[serde(tag="...")] on structs
2018-12-27 19:47:28 -05:00
Johannes Willbold
2359417804 Added ui tests, Limited serde(tag = "...") to structs with named field
Added ui test struct-representation/internally-tagged-unit
Added ui test struct-representation/internally-tagged-tuple
    
Limited the serde(tag = "...") to enums and structs with named field
2018-12-28 01:29:33 +01:00
David Tolnay
7950f3cdc5
Format with rustfmt 2018-12-10 2018-12-27 15:35:43 -05:00
David Tolnay
b87f8f35ee
Merge pull request 1447 from vincascm/master 2018-12-27 15:29:16 -05:00
Johannes Willbold
9e53405f43 Fix for rustc 1.15.0 2018-12-27 21:21:46 +01:00
David Tolnay
c6c1d8fa86
Work around deprecation of str::trim_left_matches 2018-12-27 15:20:32 -05:00
Johannes Willbold
8aa5c2b45d Removed deprected ui/enum-representation/internally-tagged-struct test 2018-12-27 20:53:08 +01:00
Johannes Willbold
414fd694c0 Allowed serde(tag="...") on structs
Added test test_internally_tagged_struct
Renamed EnumTag to TagType as it now also used for structs 
Modified serialize_struct_as_struct
2018-12-27 20:18:36 +01:00
vinoca
7e82809592 Fix tests fail since modify Container attributes rename_all 2018-12-20 14:30:23 +08:00
vinoca
0dae5db30e Support Container attributes rename_all only for Serialize or Deserialize 2018-12-19 09:46:52 +08:00
David Tolnay
5c24f0f0f3
Clean up some indentation that isn't visible to rustfmt 2018-12-10 22:31:39 -08:00
David Tolnay
c2591e9b39
Release 1.0.82 2018-12-10 22:25:27 -08:00
David Tolnay
8ce0dee6da
Fix missing dependency on quote in serde_derive_internals 2018-12-10 22:15:46 -08:00
David Tolnay
16daba8ea9
Format with rustfmt 2018-11-30 2018-12-10 22:09:34 -08:00
David Tolnay
8b4074ee77
Tests for tuple default attribute 2018-12-10 22:09:33 -08:00
David Tolnay
85fbd8793a
Support default attr in deserialize_seq_in_place 2018-12-10 22:09:31 -08:00
David Tolnay
65705e2091
Merge pull request #1442 from tcr/master
Adds support for the default attr to tuple variants in enums.
2018-12-10 22:09:21 -08:00
Tim Ryan
385a385c62 Adds support for the default attr to tuple variants in enums. 2018-12-11 00:02:50 -05:00
David Tolnay
e1edb0282a
Release 1.0.81 2018-12-07 18:30:35 -08:00
David Tolnay
5484f69164
Merge pull request #1438 from daboross/fix-untagged-enum-integer-variant-encoding
Accept integers variant encoding in Content
2018-12-07 18:17:53 -08:00
David Ross
cf1e0825c1 Support only u8 for enum identifiers within Content. 2018-12-05 17:01:48 -08:00
David Ross
86faa44915 Support only u8,u32 for enum variant identifiers in Content.
u8 correctly supports msgpack-rust, and u32 supports bincode and
presumably all other similar binary formats.
2018-12-05 15:59:47 -08:00
David Ross
a0b23cbf02 Accept integers variant encoding in Content
This allows ContentDeserializer and ContentRefDeserializer to
deserialize unsigned integers in deserialize_identifier, and
furthermore allows enums inside untagged enums to be correctly decoded
in formats which encode the enum variant as an integer.

Fixes https://github.com/serde-rs/serde/issues/1437.
2018-12-04 19:40:27 -08:00
David Tolnay
e8ffb22c0d
Merge pull request #1424 from hcpl/spanned-error-messages
Use more spans for error messages
2018-12-01 23:16:49 -08:00
David Tolnay
4d04ae0111
Sync links from serde.rs website 2018-12-01 13:01:48 -08:00
hcpl
14a3da9b16 Improve UI test coverage
With this commit I believe I've covered all `compile_error!`-based
errors.
2018-11-30 03:07:31 +02:00
hcpl
034db9f20f Improve overall quality of compile_error! errors
Also updates UI tests.
2018-11-30 02:51:49 +02:00
hcpl
8f3f073017 Use more spans for error messages 2018-11-25 16:44:41 +02: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
4821d09a48
Move all compile-fail tests to ui tests
The update-references.sh script makes these much easier to update in
bulk compared to compile-fail tests.
2018-11-24 15:43:19 -08:00
David Tolnay
b3d9d51b51
Simplify compiletest setup 2018-11-24 15:35:49 -08:00
David Tolnay
6b33abb179
Set up Travis build names 2018-11-24 15:12:48 -08:00
David Tolnay
a043b2a763
Point serde_derive_internals documentation to docs.rs 2018-11-21 14:22:33 -08:00
David Tolnay
0c3d4a8a37
Release serde_derive_internals 0.24.0 2018-11-21 14:17:55 -08:00
David Tolnay
9afc5fef11
Format with rustfmt 1.0.0-nightly 2018-11-21 01:13:17 -08:00
David Tolnay
a8a54c0568
Remove 1.26-dev docs.rs workaround
They are now building with 1.31.0-nightly.
2018-11-11 12:13:25 -08:00
David Tolnay
451ee2d78e
Clean up calls to into_iter per into_iter_on_ref lint 2018-11-10 20:10:37 -08:00
David Tolnay
820107d15e
Move emscripten CI to allow_failures
Not sure what is going on with this failure that just started happening with no
code change on our end. Wait and see if it goes away.

On asmjs-unknown-emscripten:

    Assertion failed: compiled without a main, but one is present. if you added
    it from JS, use Module["onRuntimeInitialized"]

    undefined:109
        throw ex;
        ^

    abort("Assertion failed: compiled without a main, but one is present. if you
    added it from JS, use Module[\"onRuntimeInitialized\"]") at Error

On wasm32-unknown-emscripten:

    Assertion failed: compiled without a main, but one is present. if you added
    it from JS, use Module["onRuntimeInitialized"]

    failed to asynchronously prepare wasm: abort("Assertion failed: compiled
    without a main, but one is present. if you added it from JS, use
    Module[\"onRuntimeInitialized\"]") at Error
2018-11-10 20:06:18 -08:00
David Tolnay
a51f831ae4
Drop nightly dependency of compiletest 2018-10-27 23:59:48 -07:00
David Tolnay
1b45e5766a
Release 1.0.80 2018-10-14 03:08:53 -07:00
David Tolnay
59c8951341
Merge pull request #1411 from dtolnay/vec
Optimize Vec::deserialize_in_place to deserialize elements in place
2018-10-14 03:08:04 -07:00
David Tolnay
aca61b5dda
Optimize Vec::deserialize_in_place to deserialize elements in place 2018-10-14 02:51:24 -07:00
David Tolnay
908affd24f
Remove unused code in seq and map impls 2018-10-14 02:31:56 -07:00
David Tolnay
f878d2ebd5
Do not require clippy for a green build 2018-10-06 21:26:25 -07:00