Commit graph

270 commits

Author SHA1 Message Date
Eric Huss 86d9dd21d8 0.5: Reject 0x7f (DEL) in strings.
cc #224
2018-07-10 18:13:06 -07:00
Alex Crichton 2a15817c47 Support fixed-length arrays
Turns out these are deserialized/serialized as tuples! While we're at it add
support for tuple variants and tuple structs through the same paths.

Closes #244
2018-05-24 07:25:42 -07:00
Alex Crichton 98d997c1fd Merge pull request #239 from udoprog/spans
Support spans when deserializing serde structures
2018-05-09 16:48:58 -05:00
Claudio Bley 96ca73e130 Treat unicode hex digits case-insensitively
In Rust >= 1.24.0 we could have used `char::is_ascii_hexdigit`, but to keep
compatiblity with older versions, `char::is_digit(16)` is used.

Fixes #240.
2018-05-09 22:18:14 +02:00
John-John Tedro 0616d3562c Make spanned module private and hide internals 2018-05-09 21:54:22 +02:00
John-John Tedro 407845d620 Fix incorrectly reported spans for Datetime 2018-05-07 05:36:41 +02:00
John-John Tedro 8a9ae07de5 Use BorrowedStrDeserializer instead of generated key deserializers 2018-05-07 04:57:16 +02:00
John-John Tedro 09c8957ae7 Adjust spans for more complex types 2018-05-07 04:28:00 +02:00
John-John Tedro 6b919f8833 Use custom struct/field naming to deserialize spans 2018-05-07 04:28:00 +02:00
David Tolnay 6db43965f9 Proof of concept: reporting span information to a Spanned<T> type 2018-05-06 11:06:00 +02:00
John-John Tedro 6d7c89169b Make Tokenizer emit spans 2018-05-01 13:53:52 +02:00
Kornel 6cf0d5de33 Replace try!() with ? 2018-04-16 02:12:39 +01:00
David Tolnay eab7d806e9 A toml macro 2017-11-12 23:46:34 -08:00
Alex Crichton a3f02da0c3 Merge pull request #213 from behnam/doc
[value] Fix some method docs
2017-09-15 09:07:55 -05:00
Behnam Esfahbod ✅ b7af13e689 [value] Fix some method docs 2017-09-14 22:37:51 -07:00
Alex Crichton dd4c5131eb Fix a number of compile warnings 2017-08-28 07:40:48 -07:00
Garrett Berg d386be1a49 add pretty_string_literal to be able to disable literal strings 2017-08-13 17:19:02 -06:00
Garrett Berg 76f11f2033 add spaces between array items and test for them 2017-08-13 15:31:09 -06:00
Alex Crichton ea0c2296e6 Merge pull request #204 from vitiral/rc_settings
reference count settings to bump performance a bit
2017-07-31 10:58:48 -05:00
Garrett Berg 9443fbf01f back out doc changes for now 2017-07-30 10:19:32 -06:00
Garrett Berg eb69fee5ff doc fixes 2017-07-30 10:18:00 -06:00
Garrett Berg 003a65fc9f reference count settings to bump performance a bit 2017-07-29 00:41:35 -06:00
Garrett Berg 54a4833bc1 add """ for non-literals with newlines, clean up logic and add tests 2017-07-28 09:25:53 -06:00
Garrett Berg dabe477d64 make single lines also pretty 2017-07-28 07:14:37 -06:00
Garrett Berg 83be829f0b fix bugs with pretty 2017-07-27 22:01:36 -06:00
Garrett Berg 61ff3c295c close #199: add header information for empty structs
- also add test which fails without this change
- also add a few helpful unit tests to table
2017-07-27 07:03:52 -06:00
Garrett Berg 203b4d43c2 fix Serializer::pretty_array(false) 2017-07-24 09:46:24 -06:00
Garrett Berg fba6170b95 use ignore rather than no_run for toml blocks 2017-07-24 09:18:47 -06:00
Garrett Berg ec82e695ba fix docs and add 2017-07-22 15:11:23 -06:00
Garrett Berg 973e4cc8c7 fix " 2017-07-21 12:03:42 -06:00
Garrett Berg 1e060c55d6 use builder pattern 2017-07-20 12:47:51 -06:00
Garrett Berg 3ec47e6758 pretty arrays 2017-07-09 15:20:29 -06:00
Garrett Berg 27757113ec array doesn't break anything... 2017-07-09 15:10:36 -06:00
Garrett Berg fe894fee6c add pretty sting serialization 2017-07-09 14:58:48 -06:00
Garrett Berg 36a4ebd3bf add Settings struct 2017-07-09 14:38:48 -06:00
Alex Crichton 66bbdb36a6 One more case of handling newtype structs 2017-07-06 11:43:36 -07:00
Alex Crichton 7a8c535c5a Support deserializing newtypes
Closes #196
2017-07-06 07:34:45 -07:00
debris eb138b12b9 updated toml version in the docs 0.4.2 2017-06-23 23:16:25 +02:00
Sergio Benitez 7f9e594e47 Use 'into()' to convert numerical values safely 2017-06-19 17:49:55 -07:00
Sergio Benitez f936fcfb13 Add exhaustive From<T> impls for Value 2017-06-18 03:06:19 -07:00
Pit Kleyersburg e89345af42 Implement IntoDeserializer for Value 2017-06-11 17:44:41 +02:00
Alan Du 5d36195f2d Store fractional seconds as a u32 instead of a f64
Drops precision down to the nanoseconds
2017-06-01 23:22:35 +01:00
Alan Du ce7b96c47b Add toml::ser::Error::KeyNewline back in
Avoid a breaking change
2017-06-01 22:47:24 +01:00
Alan Du bad367cab0 Allow serializing keys with \n in them
Use special quoted form

Closes https://github.com/alexcrichton/toml-rs/issues/185
2017-06-01 20:59:26 +01:00
Alan Du 4e246b2142 Truncate fractional seconds to picoseconds
Close https://github.com/alexcrichton/toml-rs/issues/186
2017-06-01 20:57:06 +01:00
Alan Du d8cc119799 Close #180 2017-06-01 12:42:16 +01:00
Alex Crichton 9a8c5d8e96 Merge pull request #183 from alanhdu/invalid_number
Better invalid number handling
2017-05-30 19:37:44 -05:00
Alan Du 87f51b38d1 Error when trying to serialize invalid float 2017-05-31 00:30:58 +01:00
Alan Du 90040b34b6 Error when parsing numbers outside of f64's range 2017-05-31 00:30:55 +01:00
Alan Du 90bdb7e96d Encode control characters with hex not decimal
Fix https://github.com/alexcrichton/toml-rs/issues/178
2017-05-30 23:55:09 +01:00