Commit graph

415 commits

Author SHA1 Message Date
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
Alex Crichton f81a488362 Bump to 0.4.3 2017-07-27 14:12:46 -07:00
Alex Crichton 0344559a07 Merge pull request #199 from vitiral/empty-fails
demonstrate failing test for 'empty' values
2017-07-27 11:29:00 -05: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
Alex Crichton 05a8c73439 Merge pull request #197 from vitiral/pretty
close #119: allow "pretty" configuration
2017-07-24 18:22:33 -05:00
Garrett Berg 203b4d43c2 fix Serializer::pretty_array(false) 2017-07-24 09:46:24 -06:00
Garrett Berg e26449614d add tests 2017-07-24 09:40:14 -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 81d7303b19 fix for rust 1.15 2017-07-10 09:45:59 -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
Alex Crichton 5bd60e7397 Merge pull request #192 from debris/update_docs
updated toml version in the docs to 0.4.2
2017-06-23 18:02:11 -05:00
debris eb138b12b9 updated toml version in the docs 0.4.2 2017-06-23 23:16:25 +02:00
Alex Crichton 49b0b3df2b Bump to 0.4.2 2017-06-22 06:55:45 -07:00
Alex Crichton 3b4261a4bb Merge pull request #190 from SergioBenitez/master
Add exhaustive From<T> impls for Value
2017-06-20 10:17:08 -05: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
Alex Crichton 5c523f14d5 Merge pull request #188 from pitkley/add-intodeserializer
Implement `IntoDeserializer` for `Value`
2017-06-12 21:06:19 -05:00
Pit Kleyersburg e89345af42 Implement IntoDeserializer for Value 2017-06-11 17:44:41 +02:00
Alex Crichton 181bff2ee4 Merge pull request #187 from alanhdu/master
More fuzzing fixes
2017-06-01 17:57:13 -05: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
Alex Crichton 10d15333b4 Merge pull request #184 from alanhdu/master
Serialize nested array of tables correctly
2017-06-01 08:36:08 -05:00
Alan Du 275d9e05f3 Add test case 2017-06-01 12:42:16 +01:00
Alan Du d8cc119799 Close #180 2017-06-01 12:42:16 +01:00
Alan Du 2c70f6961c Remove unused test macro 2017-05-31 17:36:20 +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
Alex Crichton b0b9196d43 Merge pull request #182 from alanhdu/master
Fix some fuzzing bugs
2017-05-30 19:35:42 -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
Alan Du d375f4d63a Store fraction of seconds in times unconditionally
This way, times without fractional seconds  will be compare equal to
times with 0 fractional seconds if all else is equal. For example,
    06:00:00 == 06:00:00.0

Closes https://github.com/alexcrichton/toml-rs/issues/179
2017-05-30 23:50:58 +01:00
Alex Crichton 5170d66d51 Add extern crate serde to examples/decode.rs
Closes #176
2017-05-15 14:30:18 -07:00
Alex Crichton 3a5162ba41 Bump to 0.4.1 2017-05-11 07:34:08 -07:00
Alex Crichton 38c17e6dca Merge pull request #172 from rap2hpoutre/patch-1
add example for from_str
2017-05-10 13:19:47 -05:00
Alex Crichton 83a67e8a6f Merge pull request #173 from rap2hpoutre/patch-2
add example for to_string
2017-05-10 13:05:55 -05:00
Raphaël Huchet d5ffc6cc60 add example for to_string 2017-05-10 17:39:19 +02:00
Raphaël Huchet 9158482ed9 Update de.rs 2017-05-10 17:17:58 +02:00
Raphaël Huchet 0d3b3e3a36 add example for from_str 2017-05-10 16:49:35 +02:00