137 Commits

Author SHA1 Message Date
David Tolnay
800442a75e
Handle visitor that does not need to be mutable 2017-01-13 13:34:39 -08:00
David Tolnay
88debb3fb8
Remove SeqVisitor::end() and MapVisitor::end() 2017-01-13 13:34:38 -08:00
David Tolnay
8c49e6d6a5
Resolve conflict between rename changes and skip changes 2017-01-13 01:27:07 -08:00
David Tolnay
7cc24a43fb
Merge branch master into unknown
Conflicts:
    serde_codegen/src/de.rs
2017-01-13 01:23:00 -08:00
David Tolnay
c008c6d3a8 Merge pull request #681 from serde-rs/deserialize_struct_bug
fix various serde(rename) bugs
2017-01-13 01:21:46 -08:00
David Tolnay
cb5e7c6264
Fix case of skipped variant followed by other variants 2017-01-12 23:35:39 -08:00
David Tolnay
4ef1128546
More explicit about argument to deserialize_field_visitor 2017-01-12 23:30:57 -08:00
David Tolnay
227bea1d0b
Treat skipped fields as unknown 2017-01-12 23:17:45 -08:00
David Tolnay
766ede965e
Eliminate collects in codegen for deserializing map 2017-01-12 21:52:56 -08:00
David Tolnay
eb5a49e380
Use helper function to build __field{} 2017-01-12 21:49:20 -08:00
David Tolnay
2df529cac5
Simplify codegen logic in deserializing seq 2017-01-12 21:41:27 -08:00
David Tolnay
4b66463011
Eliminate collect in deserializing seq 2017-01-12 21:29:50 -08:00
David Tolnay
b907cfef85
Eliminate collect in visitor generics 2017-01-12 21:28:09 -08:00
David Tolnay
506c8cc087
Simplify the trait paths used in bounds 2017-01-12 21:24:51 -08:00
David Tolnay
3951ef91c0
Don't need aster to construct syn::Ident 2017-01-12 21:15:13 -08:00
Oliver Schneider
a07b6bd9e7 also use the renamed variant names during deserialization 2017-01-12 20:21:59 +01:00
Oliver Schneider
8dd06eed2f type inference failure 2017-01-12 20:19:00 +01:00
Oliver Schneider
abe305dbfe fix deserialize_struct passing the original field names instead of the renamed ones 2017-01-12 20:17:02 +01:00
David Tolnay
ca47eb929c Merge pull request #678 from serde-rs/empty
Handle various degenerate cases
2017-01-11 11:45:24 -08:00
David Tolnay
b01c23b5ee
Also provide a smarter alternative for the other impossible case 2017-01-11 11:34:47 -08:00
David Tolnay
3aaf29c846
Remove ref in top-level let pattern
Discouraged by Clippy.
2017-01-11 11:12:53 -08:00
David Tolnay
d2eea87001
Handle various degenerate cases 2017-01-11 11:02:24 -08:00
David Tolnay
1f8b803607
Repetition for field visitor arms 2017-01-09 00:37:37 -08:00
David Tolnay
516cc8b04e
Stop generating visit_usize and visit_bytes for FieldVisitor 2017-01-08 01:01:56 -08:00
David Tolnay
4193122472
Use the more concise paths in generated code 2017-01-08 00:47:44 -08:00
David Tolnay
bf873a7b3f
Merge branch origin/master into origin/enum
Conflicts:
    serde/src/de/mod.rs
    serde_codegen/src/de.rs
    testing/tests/test_bytes.rs
2017-01-08 00:31:07 -08:00
Shing Lyu
95ffca9bbe Implemented skip_deserializing for enum 2016-12-16 20:29:21 +08:00
Cat Plus Plus
f75d286b90 Explictly discard result of visiting IgnoredAny
Makes the code generated by `derive(Deserialize)` compile cleanly when
`unused_results` lint is enabled.
2016-10-22 08:00:44 +02:00
David Tolnay
b4d5c26f4e
Update to latest syn and quote 2016-10-08 15:36:02 -07:00
David Tolnay
e547a06639 Simplify deserialize_field_visitor 2016-10-03 13:45:11 -07:00
David Tolnay
42987a5b24 Fix break in quote 0.2.2 2016-10-03 13:37:46 -07:00
David Tolnay
6ccb6c9130
Clean up syn workarounds 2016-09-28 09:29:12 -07:00
David Tolnay
9fe16767c5
Use iter::repeat to build phantom exprs 2016-09-28 08:57:53 -07:00
David Tolnay
effa298871
Fix differences in the generated code 2016-09-27 09:56:35 -07:00
David Tolnay
7d09b1475c
Fix clippy lints in serde_codegen 2016-09-27 00:46:03 -07:00
David Tolnay
0c18c151e2
Revamp serde_codegen_internals error handling 2016-09-27 00:11:37 -07:00
David Tolnay
1eca7766ba
Bump syn dependency 2016-09-24 09:54:10 -07:00
David Tolnay
55e5f19437
Same for deserialization 2016-09-12 00:50:30 -07:00
David Tolnay
85f1bf0259
Enum deserialization API 2016-08-23 22:17:28 -04:00
David Tolnay
a732b9bad3
Fix codegen with lifetimes but no type parameters 2016-08-19 11:12:38 -04:00
Homu
d120539310 Auto merge of #478 - serde-rs:visitor, r=oli-obk
Simplify generated visitors

Neither `__FieldVisitor` nor `__Visitor` need the `__D: Deserializer` type parameter.
2016-08-08 19:52:36 +09:00
David Tolnay
c539563687
Remove unnecessary nesting fron generated Deserialize implementations 2016-08-03 21:08:17 -07:00
David Tolnay
d5102a7afd
Simplify generated visitors 2016-08-03 19:56:47 -07:00
David Tolnay
f25e6d3ea9
Close the seq before failing on invalid length
Equivalent to what 0f9a930 does for maps.
2016-07-05 10:08:36 -07:00
David Tolnay
431cbe48b7 Merge pull request #422 from serde-rs/missing
Close the map before checking for missing fields
2016-07-05 07:11:03 -07:00
David Tolnay
0f9a930c4f
Close the map before checking for missing fields 2016-07-05 01:42:38 -07:00
David Tolnay
1a449bb3d0
Invalid-length when enum seq is too short 2016-07-05 01:35:20 -07:00
David Tolnay
149c87d7c2
Record expansion info 2016-07-03 10:53:33 -07:00
David Tolnay
d450de1482
Update syntex to 0.37 2016-07-02 20:20:44 -07:00
David Tolnay
2d5a26dfc0
Rename serde_internals to serde_codegen_internals 2016-06-30 19:53:57 -07:00