Commit Graph

627 Commits (master)

Author SHA1 Message Date
Matti Niemenmaa 2059589f54 Avoid panic on pretty string ending in single quote
Fixes #262.
2018-10-01 11:58:57 +03:00
Alex Crichton f998fbe360 Bump to 0.4.7 2018-09-25 10:09:07 -07:00
Alex Crichton 82b3b47eb8
Merge pull request #261 from rhysd/fix-multiline-string-key
Fix multi-line strings are not allowed for key (#260)
2018-09-25 10:08:38 -07:00
rhysd 2f372b9f10 Fix multi-line strings are not allowed for key
In spec https://github.com/toml-lang/toml#keys

Quoted keys are clarified as

> he exact same rules as either basic strings or literal strings

TOML clearly distinguishes basic string and multi-line basic string
(literal string is also).

https://github.com/toml-lang/toml#string

So table key and quoted key should not allow multi-line basic string
and multi-line literal string.

ABNF definition also describes that.

https://github.com/toml-lang/toml/blob/master/toml.abnf

```
string = ml-basic-string / basic-string / ml-literal-string / literal-string

quoted-key = basic-string / literal-string
```

`string` contains `ml-*` but `quoted-key` doesn't.
2018-09-25 16:33:52 +09:00
Alex Crichton 8181a7e645
Merge pull request #255 from kornelski/master
Support deserializing from other integer types
2018-08-06 10:17:30 -05:00
Kornel bc726bb042 Test serde_json interoperability 2018-08-06 15:23:32 +01:00
Alex Crichton 7c1da18505
Merge pull request #254 from ehuss/macro-0.5
Support the new 0.5 syntax in the toml! macro.
2018-08-05 20:27:26 -05:00
Kornel de6b59fb12 Support deserializing from other integer types 2018-08-05 23:25:06 +01:00
Eric Huss 223e4b862b Support the new 0.5 syntax in the toml! macro.
- Space in datetime.
- +- inf, nan, 0.0
- Dotted keys.
2018-08-05 14:26:46 -07:00
Alex Crichton 55a11b8955
Merge pull request #252 from ehuss/dotted-keys
0.5: Support dotted keys.
2018-07-28 15:15:01 -07:00
Eric Huss d6f383d20c Don't allow intermixing inline tables and dotted key tables. 2018-07-27 11:49:30 -07:00
Eric Huss 2b6e286fb6 Support older rustc. 2018-07-16 09:10:38 -07:00
Eric Huss 9796059c58 0.5: Support dotted keys.
cc #224
2018-07-16 09:10:38 -07:00
Alex Crichton 010ae9ffde
Merge pull request #249 from ehuss/int-radix
0.5: Support hex/oct/bin integers.
2018-07-11 15:17:23 -05:00
Eric Huss ec939223aa 0.5: Support hex/oct/bin integers.
cc #224
2018-07-11 09:21:29 -07:00
Alex Crichton 2a24f054f0
Merge pull request #251 from ehuss/datetime-space
0.5: Support space separator in datetime.
2018-07-11 09:05:26 -05:00
Alex Crichton 1ed9b1ddd4
Merge pull request #250 from ehuss/reject-del
0.5: Reject 0x7f (DEL) in strings.
2018-07-11 09:04:29 -05:00
Alex Crichton f99ab3f5e3
Merge pull request #248 from ehuss/float-0.5
0.5: Support floats nan, inf, and +/-0.0.
2018-07-11 09:01:53 -05:00
Eric Huss 69b4571c6b 0.5: Support floats nan, inf, and +/-0.0.
cc #224
2018-07-11 00:50:04 -07:00
Eric Huss c67263f359 0.5: Reject 0x7f (DEL) in strings.
cc #224
2018-07-10 18:13:06 -07:00
Eric Huss 1e51ec77a0 0.5: Support space separate in datetime.
cc #224
2018-07-10 17:14:16 -07:00
Alex Crichton 2be7ce9079
Merge pull request #245 from alexcrichton/tuples
Support fixed-length arrays
2018-05-24 10:22:11 -05:00
Alex Crichton b192b562b4 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 eddcac6878 Bump to 0.4.6 2018-05-24 07:14:48 -07:00
Alex Crichton cb49d59992
Merge pull request #239 from udoprog/spans
Support spans when deserializing serde structures
2018-05-09 16:48:58 -05:00
Alex Crichton 8a54e5e0b6
Merge pull request #241 from avdv/fix-240
Treat unicode hex digits case-insensitively
2018-05-09 16:15:56 -05:00
Claudio Bley 264d828654 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 0a5fe3fff9 Make spanned module private and hide internals 2018-05-09 21:54:22 +02:00
John-John Tedro 87916e99ad Reintroduce serde_derive as dev-dependencies 2018-05-07 05:40:49 +02:00
John-John Tedro 2b40d542a0 Fix incorrectly reported spans for Datetime 2018-05-07 05:36:41 +02:00
John-John Tedro 579cf491e6 Use BorrowedStrDeserializer instead of generated key deserializers 2018-05-07 04:57:16 +02:00
John-John Tedro 6c067202e0 Adjust spans for more complex types 2018-05-07 04:28:00 +02:00
John-John Tedro 6ff5c445f3 Use custom struct/field naming to deserialize spans 2018-05-07 04:28:00 +02:00
David Tolnay fd87ce35d5 Proof of concept: reporting span information to a Spanned<T> type 2018-05-06 11:06:00 +02:00
Alex Crichton 44bec61369
Merge pull request #237 from udoprog/spans
Make Tokenizer emit spans
2018-05-01 08:49:05 -05:00
John-John Tedro 119674e135 Make Tokenizer emit spans 2018-05-01 13:53:52 +02:00
Alex Crichton ffb1b5e061
Merge pull request #234 from kornelski/master
Replace try!() with ?
2018-04-16 09:28:09 -05:00
Kornel 7de2261b20 Replace try!() with ? 2018-04-16 02:12:39 +01:00
Alex Crichton b0f6f858f1
Merge pull request #220 from LeopoldArkham/master
Small copy-paste error in license text
2017-12-02 09:16:58 -06:00
LeopoldArkham 53cd061cee
Serde -> toml-rs 2017-12-02 14:22:52 +01:00
Alex Crichton 823d1f5830
Merge pull request #217 from dtolnay/macro
A toml macro
2017-11-20 13:39:31 -06:00
David Tolnay d53db5c533
A toml macro 2017-11-12 23:46:34 -08:00
David Tolnay 3ad6e71f53
Move tests into their own crate 2017-11-12 19:33:11 -08:00
Alex Crichton 3b77b5fb65 Clarify wording of license information in README.
This text historically was copied verbatim from rust-lang/rust's own README [1]
with the intention of licensing projects the same as rustc's own license, namely
a dual MIT/Apache-2.0 license. The clause about "various BSD-like licenses"
isn't actually correct for almost all projects other than rust-lang/rust and
the wording around "both" was slightly ambiguous.

This commit updates the wording to match more precisely what's in the
standard library [2], namely clarifying that there aren't any BSD-like licenses
in this repository and that the source is licensable under either license, at
your own discretion.

[1]: f0fe716dbc (license)
[2]: f0fe716dbc/src/libstd/lib.rs (L5-L9)
2017-10-30 14:51:07 -07:00
Alex Crichton 85a1c8a5d7 Merge pull request #213 from behnam/doc
[value] Fix some method docs
2017-09-15 09:07:55 -05:00
Behnam Esfahbod ✅ 2584d1327c [value] Fix some method docs 2017-09-14 22:37:51 -07:00
Alex Crichton 9e53679093 Fix a number of compile warnings 2017-08-28 07:40:48 -07:00
Alex Crichton 7617e934a8 Bump to 0.4.5 2017-08-13 21:02:21 -07:00
Alex Crichton 4d3f040cef Merge pull request #210 from vitiral/rm-fixme
close #209: remove FIXME, appears to have been invalid
2017-08-13 21:02:01 -07:00
Garrett Berg d17c881c09 close #209: remove FIXME, appears to have been invalid 2017-08-13 17:34:36 -06:00