Commit Graph

66 Commits

Author SHA1 Message Date
David Tolnay
47efbc6d75
Don't need to pass back the input here 2017-02-25 11:32:27 -08:00
David Tolnay
17279e8a4f
Simplify case conversion implementation 2017-02-25 11:32:22 -08:00
David Tolnay
06c631db05
Bring in the tests 2017-02-25 11:02:51 -08:00
David Tolnay
7952bad41f
Move case conversion to its own file 2017-02-25 11:02:25 -08:00
Michael Mokrysz
3308f81c3a Saving progress on naming convention conversion code to try new Inflector changes. #788 2017-02-25 13:24:49 +00:00
Michael Mokrysz
84915268ee Minor fixes for pull request. Cheers @dtolnay. 2017-02-24 01:55:31 +00:00
Michael Mokrysz
3b59d47e07 Heavily refactored rename_all and switched to SCREAMING_SNAKE_CASE. 2017-02-23 23:22:54 +00:00
Michael Mokrysz
fc94c5399a Implementing rename_all container attribute using Inflector trait. #140 2017-02-23 18:58:41 +00:00
David Tolnay
017e6d304f
Release 0.9.8 2017-02-21 10:59:42 -08:00
David Tolnay
89cbb81673
Include readme and licenses in crates.io archive
Fixes #772.
2017-02-20 21:11:57 -08:00
David Tolnay
3d6e086d3e
Support custom paths in container attribute serde(default="...") 2017-02-20 17:06:00 -08:00
Thomas de Zeeuw
7bee779514 Only allow #[serde(default)]` on structs 2017-02-21 00:15:00 +01:00
Thomas de Zeeuw
9444db5f19 Add support for #[serde(default)] on structs
This allows structs to use the default value for each field defined in
the struct’s `std::default::Default` implementation, rather then the
default value for the field’s type.

```
struct StructDefault {
    a: i32,
    b: String,
}

impl Default for StructDefault {
    fn default() -> StructDefault {
        StructDefault{
            a: 100,
            b: "default".to_string(),
        }
    }
}
```

The code above will now return `100` for field `a` and `”default”` for
`b`, rather then `0` and `””` respectively.
2017-02-20 22:35:31 +01:00
David Tolnay
535ab1e04b
Merge pull request #771 from elliottslaughter:internally_content_tagged 2017-02-19 16:08:49 -08:00
David Tolnay
a3fe03c323
Serialization of Haskell style enums 2017-02-19 16:04:39 -08:00
Elliott Slaughter
4538143d00 Initial work to support serialization of adjacently tagged enums. 2017-02-18 20:46:37 -08:00
David Tolnay
7f08894a32
Remove dependency on unneeded syn feature 2017-02-17 21:01:42 -08:00
David Tolnay
f500db6e91
Pair serialize_with and deserialize_with into one attribute 2017-02-14 17:36:50 -08:00
David Tolnay
e8651a52e7
Rustfmt 2017-02-12 22:15:59 -08:00
David Tolnay
d1306a78ec
Release 0.9.6 2017-02-03 08:02:47 -08:00
David Tolnay
ff21d557c7
Untagged and internally tagged enums 2017-02-02 18:48:30 -08:00
David Tolnay
d960571439
Release 0.9.5 2017-02-01 01:01:06 -08:00
Oliver Schneider
368784949e move to cargo clippy instead of using the clippy plugin (#733)
* move to cargo clippy instead of using the clippy plugin

fixes #729

* non-exectable scripts must be run with `sh`

* don't build serde in the clippy travis job

* only run clippy tests if installing clippy succeeds

* why is travis so picky?

* no more serde_codegen

* serde_test_suite_deps has no features

* don't use empty loops, llvm optimizes them to undefined behaviour

* abort the clippy job when clippy lints are triggered

* use caches on travis to speed up builds

* why are we even using `travis-cargo`?

* need to reinstall clippy frequently due to nightly updates

* command line tools are hard
2017-01-31 09:09:37 -08:00
David Tolnay
c31f76321c
Release 0.9.2 2017-01-28 09:10:39 -08:00
David Tolnay
c0a06bdc96
Update to syn 0.11 2017-01-27 15:25:42 -08:00
David Tolnay
e4f7d8513c
Clean up clippy lints in codegen_internals 2017-01-25 21:22:15 -08:00
David Tolnay
4c77af53e5
Clean up dependency declarations 2017-01-25 14:54:32 -08:00
Oliver Schneider
b105423e5e add travis badge to crates.io 2017-01-24 10:30:10 +01:00
David Tolnay
3a52364f3e
Release 0.9.0-rc1 2017-01-15 09:26:44 -08:00
David Tolnay
ad34c14c8c
Prepare for 0.9 breaking changes 2017-01-08 00:18:53 -08:00
David Tolnay
9338c4f1b9
Release 0.8.21 2016-12-24 13:10:24 -05:00
Shing Lyu
2fea8c9c28 Implement skip_serializing for enum variant 2016-12-24 22:34:22 +08:00
David Tolnay
08c59a2e0e
Release 0.8.20 2016-12-16 07:58:52 -08:00
Shing Lyu
95ffca9bbe Implemented skip_deserializing for enum 2016-12-16 20:29:21 +08:00
David Tolnay
8dba87661b
Bump serde_codegen_internals because it failed to publish somehow 2016-11-19 11:47:19 -08:00
David Tolnay
17fb4cb503
Release 0.8.18 2016-11-19 11:40:00 -08:00
David Tolnay
f8c3d225a3
Shorten the syn meta item matches 2016-11-02 22:56:27 -07:00
David Tolnay
6d40d9e8ec
Update codegen internals to syn 0.10 2016-11-02 22:52:20 -07:00
David Tolnay
85c95040b3
Release 0.8.12 2016-10-08 15:38:29 -07:00
David Tolnay
b4d5c26f4e
Update to latest syn and quote 2016-10-08 15:36:02 -07:00
David Tolnay
2a2c098eeb
Release 0.8.10 2016-09-28 09:56:15 -07:00
David Tolnay
effa298871
Fix differences in the generated code 2016-09-27 09:56:35 -07:00
David Tolnay
9a86e6818f
Use push_str to support old compilers 2016-09-27 00:47:54 -07:00
David Tolnay
7e441e5110
Handle various attribute parsing error cases 2016-09-27 00:40:37 -07:00
David Tolnay
0c18c151e2
Revamp serde_codegen_internals error handling 2016-09-27 00:11:37 -07:00
David Tolnay
4ad6c4fd56
Include unknown attribute name in error message 2016-09-27 00:02:15 -07:00
David Tolnay
1eca7766ba
Bump syn dependency 2016-09-24 09:54:10 -07:00
David Tolnay
51f95575ec
Merge branch origin/master into origin/syn
Conflicts:
    serde_codegen/Cargo.toml
    serde_codegen_internals/Cargo.toml
    serde_derive/Cargo.toml
2016-09-24 09:29:21 -07:00
Oliver Schneider
429de89276
Release 0.8.9 2016-09-23 07:11:59 -07:00
David Tolnay
c34baa1e5f
No more syntex for serde_derive 2016-09-11 19:55:13 -07:00