David Tolnay
539cc441cb
Merge pull request #392 from bouk/fix-truefalse
...
Fix falsey typo
2017-12-07 09:43:33 -08:00
Bouke van der Bijl
53b5ddbdcd
Fix falsey typo
2017-12-07 17:36:36 +01:00
David Tolnay
788e431fde
Encountering an error is the cold path
2017-12-04 23:51:13 -08:00
David Tolnay
0048e76100
Decrease size of ErrorCode from 32 bytes to 24 bytes
2017-12-04 23:47:31 -08:00
David Tolnay
561b0dbe4d
Make deserialize_bytes work more like deserialize_str
2017-12-04 23:43:50 -08:00
David Tolnay
92ddbdf493
Merge pull request #390 from serde-rs/try
...
Override the try macro to eliminate From calls
2017-12-03 22:23:15 -08:00
David Tolnay
86cb0b9493
Override the try macro to eliminate From calls
...
We only use our own error type; no need for From conversions provided
by the standard library's try! macro. This reduces lines of LLVM IR by
4%.
2017-12-03 22:08:24 -08:00
David Tolnay
5bf9144d60
Merge pull request #389 from serde-rs/hints
...
Implement all the deserializer hints
2017-12-03 22:08:02 -08:00
David Tolnay
0961dbe9e7
Implement all the deserializer hints
...
This is a way to avoid instantiating all the Visitor methods on every
Visitor that is used with serde_json. If the Deserialize impl hints
that a boolean is required by invoking deserialize_bool, we don't also
need to instantiate its visit_u64 and visit_i64 and visit_f64 and
visit_str and visit_borrowed_str and visit_unit and visit_seq and
visit_map methods if the input contains some other type. Instead we
render the invalid_type error in a central place in the serde_json
Deserializer that is instantiated just once.
Improves compile time of json-benchmark by 30%.
2017-12-03 21:50:23 -08:00
David Tolnay
19b56b68ba
Merge pull request #388 from serde-rs/mapkey
...
Stop instantiating parse_value in MapKey::deserialize_any
2017-12-03 16:35:06 -08:00
David Tolnay
08b00d1855
Stop instantiating parse_value in MapKey::deserialize_any
...
The parse_value method is the most expensive method in serde_json in
terms of compile time. Before this change, we were instantiating it
twice for every derive(Deserialize) struct because every struct has
two different Visitor impls -- one for the key type and one for the
struct overall -- see https://serde.rs/deserialize-struct.html .
This improves compile time of json-benchmark by 20%.
2017-12-03 16:04:54 -08:00
David Tolnay
a882cd448d
Merge pull request #387 from serde-rs/fix-position
...
Stop instantiating fix_position so many times
2017-12-03 15:44:33 -08:00
David Tolnay
c8f0eb8bf9
Stop instantiating fix_position so many times
2017-12-03 15:00:50 -08:00
David Tolnay
da044527fc
Release 1.0.7
v1.0.7
2017-12-01 10:43:53 -08:00
David Tolnay
3549437f4a
Merge pull request #384 from bouk/stream-literals
...
Support top-level primitives in StreamDeserializer
2017-12-01 10:43:18 -08:00
Bouke van der Bijl
8b486189b7
Support top-level primitives in StreamDeserializer
2017-12-01 18:41:25 +01:00
David Tolnay
a4b2223762
Update ui tests to include nightly wording change
2017-11-28 22:00:25 -08:00
David Tolnay
ba3c859d58
Update stderr files for -Z external-macro-backtrace
2017-11-22 08:50:41 -08:00
David Tolnay
fd26825fd7
Merge pull request #383 from xfix/patch-1
...
Warn about enum_variant_names violations in enum N
2017-11-22 08:46:28 -08:00
Konrad Borowski
17ef410097
Warn about enum_variant_names violations in enum N
...
Clippy fixed the bug in question.
2017-11-22 17:34:09 +01:00
David Tolnay
c5f30c3eb8
Release 1.0.6
v1.0.6
2017-11-09 09:38:13 -08:00
David Tolnay
8824013224
Merge pull request #382 from ignatenkobrain/patch-2
...
bump linked-hash-map to 0.5
2017-11-09 09:37:28 -08:00
Igor Gnatenko
813c31f499
bump linked-hash-map to 0.5
2017-11-09 18:24:54 +01:00
David Tolnay
2453f51e6c
Whitelist needless_pass_by_value lint
2017-11-06 22:13:48 -08:00
David Tolnay
3dad80b406
Remove unnecessary 'static in consts
2017-10-29 22:05:11 -07:00
David Tolnay
33021c460e
Suppress lint about fallible From<Error> for io::Error
...
The unreachable is actually unreachable.
2017-10-29 22:00:53 -07:00
David Tolnay
8b3f37aef7
Release 1.0.5
v1.0.5
2017-10-28 23:39:20 -04:00
David Tolnay
683470ab2b
More detailed documentation of Index trait
2017-10-28 23:38:15 -04:00
David Tolnay
3e88d7b4ef
Merge pull request #374 from sinkuu/takebyvalue
...
Remove unnecessary allow(needless_pass_by_value)
2017-10-26 04:13:08 -07:00
sinkuu
35fd8c4c93
Remove unnecessary allow(needless_pass_by_value)
2017-10-26 18:16:40 +09:00
David Tolnay
1d972995a4
Adapt contributing.md from Serde
2017-10-22 15:57:16 -07:00
David Tolnay
deede62d1b
Add error banner when running test suite without nightly compiler
2017-10-22 15:57:00 -07:00
David Tolnay
6c1e480ce2
Clean up identity conversions
2017-10-20 21:39:55 -07:00
David Tolnay
bea035b19d
Release 1.0.4
v1.0.4
2017-10-15 10:40:24 -07:00
David Tolnay
f9f204cb41
Explain square bracket indexing in more detail
2017-10-15 10:37:54 -07:00
Oliver Schneider
cec1857cfb
Merge pull request #368 from twify93/patch-1
...
README - add additional info about untyped Example - closes #367
2017-10-13 13:56:38 +02:00
Lachezar Lechev
732c4702ba
README - add additional info about untyped Example
2017-10-12 12:11:41 +02:00
David Tolnay
efad89d59a
Comma outside of array or object is not necessarily trailing
...
This code catches things like `[1, 2], 3` where the `, 3` are trailing
characters but the comma is not a trailing comma. Trailing comma is like
the commas in `[1,]` or `{"f":2,}`.
2017-09-24 23:41:15 -07:00
David Tolnay
2a91a88581
Update ui test failure message
2017-09-23 12:23:58 -07:00
David Tolnay
adade3344a
Merge pull request #353 from fmoor/feature/trailing_comma
...
change error type for trailing commas, fixes #352
2017-09-09 13:15:54 -07:00
David Tolnay
6ec3ae1077
Remove commented code from PR
2017-09-09 13:05:40 -07:00
fmoor
1b02cfec24
add ErrorCode::TrailingComma
2017-09-05 17:25:17 -07:00
fmoor
4afb61cc02
change error type for trailing commas, fixes #352
2017-09-05 17:25:17 -07:00
David Tolnay
764e9607cf
Release 1.0.3
v1.0.3
2017-09-04 13:42:48 -07:00
David Tolnay
8e01f44f47
Merge pull request #356 from serde-rs/ignore
...
Optimize deserialize_ignored_any
2017-09-04 13:41:24 -07:00
David Tolnay
79db7d4fe7
Optimize deserialize_ignored_any
2017-09-04 13:26:50 -07:00
David Tolnay
b67a9470c5
Remove unused extern crate core
2017-09-04 12:02:55 -07:00
David Tolnay
fd96650377
Ignore cast_lossless lint
2017-09-01 21:47:38 -07:00
David Tolnay
70dd4be9db
Ignore clippy's use_self lint
2017-08-24 00:25:54 -07:00
David Tolnay
66b37bd0dd
Replace deprecated compiletest::default_config()
2017-08-24 00:23:16 -07:00