Commit Graph

11 Commits

Author SHA1 Message Date
Robert O'Callahan
cc0d045f5c Add Deserialize impl for std::ops::Range
Resolves #796
2017-03-10 08:39:34 +13:00
David Tolnay
dd6989d551
Actually run unstable tests 2017-03-08 21:02:15 -08:00
Jon Gjengset
0c2fed49e2
Add Deserialize impl for CStr
Fixes #810
2017-03-08 23:57:26 -05:00
David Tolnay
cc06f070d1
Use the existing CString error message 2017-03-05 13:59:18 -08:00
Jon Gjengset
d90eecd4a2
Add tests for CStr(ing) ser/de 2017-03-03 18:06:04 -05:00
David Tolnay
75e6da02d3
Split up test suite so it compiles in parallel 2017-02-24 15:39:18 -08:00
David Tolnay
3d6e086d3e
Support custom paths in container attribute serde(default="...") 2017-02-20 17:06:00 -08: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
ff21d557c7
Untagged and internally tagged enums 2017-02-02 18:48:30 -08:00
David Tolnay
a9b5cc4830
Fix invalid_length message for tuples and arrays 2017-01-28 15:00:54 -08:00
David Tolnay
7a2bfdc1dd
Consistent underscores in root directory 2017-01-25 20:45:33 -08:00