Commit Graph

627 Commits (master)

Author SHA1 Message Date
TheOddGarlic 34db433429 bump hashbrown, fix warnings 2022-08-02 12:42:44 +03:00
Dion Dokter e32c299cb6 Added build step for no_std in the workflow 2022-08-02 12:36:48 +03:00
Dion Dokter 0cf55f5b46 Added no_std support. 2022-08-02 12:36:48 +03:00
Eric Huss cf867939ad
Merge pull request #468 from kianmeng/fix-typos
Fix typos
2022-07-31 14:39:31 -07:00
Kian-Meng Ang 81e7e22176 Fix typos 2022-07-30 22:11:38 +08:00
Eric Huss 70caf40853
Merge pull request #463 from ehuss/version-bump
Bump to 0.5.9
2022-04-14 16:57:03 -07:00
Eric Huss 63dd7f7fde Bump to 0.5.9 2022-04-14 16:54:23 -07:00
Harvey Hunt 499e8c4bb3
examples: Allow dead code (#450)
The examples deny warnings, however a couple of examples deserialise TOML into
structs. The fields of these structs are never read, which breaks cargo test
in nightly mode.

Allow dead code to fix the CI build.
2021-11-09 13:28:06 -06:00
David James 83d787c60d
Make datetime.rs structs and fields public #431 (#439)
* Make datetime.rs structs and fields public #431

* Make {Date, Time, Offset} public #431 #439

* rustfmt: alphabetize pub use declaration

* Add docs for Datetime, Date, Time, Offset

* Correct doc for Offset, make others consistent

Co-authored-by: David James <davidcjames@gmail.com>
2021-08-20 09:32:50 -05:00
Squirrel d8a9a98cbb
Use entry api to remove a lookup in deserialisation loop (#438)
* Use entry api to remove a lookup in a loop

* cargo fmt
2021-08-10 11:25:38 -05:00
dependabot-preview[bot] c2a069f5de
Upgrade to GitHub-native Dependabot (#427)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-29 14:35:13 -05:00
Eric Huss a6420b64d5
Merge pull request #373 from mgsloan/allow-empty-table-keys
Allow empty table keys
2021-04-26 13:32:09 -07:00
Eric Huss 1928707496
Fix serialization of -0.0. (#426) 2021-04-26 09:05:28 -05:00
Eric Huss b1417006df
Merge pull request #417 from hone/patch-1
Fix comment typo
2021-02-06 10:43:17 -08:00
Terence Lee a6e3d52f47
Fix comment typo 2021-02-06 11:36:07 -06:00
Eric Huss 94b319f5ee
Merge pull request #414 from ehuss/version-bump
Bump to 0.5.8
2020-12-18 09:35:48 -08:00
Eric Huss 6d0c41fc9c Bump to 0.5.8 2020-12-18 09:32:46 -08:00
Eric Huss e454f3960a
Merge pull request #409 from Stupremee/patch-1
Show `Spanned` and `Datetime` in docs
2020-11-13 13:06:12 -08:00
Stu ae19667f74
Remove `no_inline` from value re-exports 2020-11-13 20:45:29 +01:00
Stu 926c45c022
Remove `no_inline` from `Spanned` import 2020-11-13 20:42:06 +01:00
Alex Crichton 9a94610872 Bump to 0.5.7 2020-10-11 10:31:27 -07:00
Alex Tokarev c74293f7a8
Improve error message when parsing unquoted string (#385)
* Improve error message when parsing unquoted string

* Remove conversion to lowercase in parse_keylike()

Converting keys to lowercase goes against
TOML specification for floats.

* Change error message for unquoted string
2020-10-11 12:30:55 -05:00
pyfisch 940fcf9e18
Allow delimiter quotes at the end of multiline strings (#393)
TOML allows (unlike many other formats) up to 2
additonal quotes that are part of the string:

basic = """2 extra quotes -->"""""
literal = '''here too ''''

Changed in TOML v1.0.0-rc.1

See also #392
2020-05-28 10:39:55 -05:00
Bram Geron 7a43ac9e9c
Apply some Clippy suggestions. (#378) 2020-02-25 12:08:29 -06:00
Bram Geron d99f5665b4
Rustdoc: Add links. Show all reexports as reexports. (#377)
* Rustdoc: Add links. Show all reexports as reexports.

* Reformat.
2020-02-25 12:07:55 -06:00
Michael Sloan f74715cb88 Allow empty table keys
Quoting 68076ffc6d (user-content-keys)

> A bare key must be non-empty, but an empty quoted key is allowed (though discouraged).

See also the discussion in https://github.com/toml-lang/toml/issues/432
2020-01-31 00:17:55 -07:00
Michael Sloan bb675c5f56
Fix roundtripping of \u001f and \u007f in toml string literals (#372) 2020-01-30 08:55:36 +01:00
Eric Huss f60e342342
Merge pull request #370 from zeenix/fix-typo
Fix a small typo in docs
2020-01-19 13:26:06 -08:00
Zeeshan Ali 87fcd656a6 Fix a small typo in docs 2020-01-19 21:01:22 +01:00
Alex Crichton 436acbd31d Bump to 0.5.6 2020-01-16 09:15:46 -08:00
Michael Sloan f92c15f1b8 Fix a couple errors in DateStrEmitter (#368) 2020-01-15 10:58:12 -06:00
Eric Huss 1b8e0d78bd
Merge pull request #365 from AnderEnder/remove-deprecated-error-description
Remove deprecated Error::description
2019-12-22 09:46:36 -08:00
Andrii Radyk b9507d859d remove deprecated Error::description 2019-12-22 00:06:00 +01:00
daubaris 60b874308e Mixed type arrays (#358)
* Added support of mixed-type arrays

* Add tests cases

* Replaced &'static str type for type_ and created a new enum instead

* Restored ArrayMixedType
2019-11-22 10:28:29 -06:00
Alex Crichton 75129040cd Bump to 0.5.5 2019-11-01 07:58:38 -07:00
Maxim Vorobjov 1e6bfbca98 replace copied wit filter_map for rustc 1.35 compatibility (#354) 2019-11-01 09:58:09 -05:00
est31 4673cfd797 Replace the test added by #349 with a bench (#351)
CI environments can be noisy and while the test worked great
locally on my machine, it didn't on the CI environment.
This replaces the test with a (manually tracked) benchmark.
As per https://github.com/alexcrichton/toml-rs/pull/349#issuecomment-546998173
2019-10-29 09:10:15 -05:00
Tshepang Lekhonkhobe 4b05a9d349 update (#352) 2019-10-29 09:01:41 -05:00
Alex Crichton 189d2b92ee Bump to 0.5.4 2019-10-28 08:05:55 -07:00
est31 c049b7aaec Decrease deserialization complexity from quadratic to linear (#349)
* Speed up array code

* Speed up map code too

Also add regression test

* Use more obvious closure notation

* Document the builder functions
2019-10-28 10:05:13 -05:00
est31 ec21d604f8 Support for dotted table spans (#340)
* "Support" spans for maps

In toml you can declare maps via {} and via [name].
We can't obtain spans for [] maps but at least we
can emit fake spans to make SpannedValue work.

We also add a regression test.

* Don't regress the inline table case

* Also support arrays
2019-10-28 09:01:23 -05:00
Alex Crichton e9f5290926 Switch from linked-hash-map to indexmap
Follow the footsteps of serde_json!

Closes #348
2019-10-25 12:08:28 -07:00
est31 8995cef9d6 Spanned: impl PartialEq, Eq, Hash, PartialOrd, Ord in terms of the value (#344)
* Spanned: impl PartialEq, Eq, Hash, PartialOrd, Ord in terms of the value

This is because we want to be able to index into HashMap<Spanned<String>, T>
with a dummy span and get results where only the content has to match.

* Add Borrow impl

* Add tests
2019-10-25 14:05:31 -05:00
Linda_pp 9ed2903517 Remove outdated Travis CI badge (#346) 2019-10-16 09:36:27 -05:00
Kyle Clemens 2a6729f543 feat: support tabs in basic strings (#343)
Close #310.
2019-10-15 08:45:17 -05:00
Guillaume Fraux e457e4eb33 get_mut should return a mutable reference (#338) 2019-10-03 10:29:50 -05:00
Sergey "Shnatsel" Davidoff 41dd8e6741 Forbid unsafe code (#332)
* Forbid unsafe code

* Add badge advertising that unsafe code is forbidden

* Revert "Add badge advertising that unsafe code is forbidden"

This reverts commit e8d35d20d016a341d37969b975463588d3143528.

* Comment on #![forbid(unsafe_code)]

* Run rustfmt
2019-09-30 09:57:16 -05:00
est31 7c9b0a39db Support deserializing spanned keys (#333)
* Store key spans in the deserializer

* Support deserializing spanned keys

* Store key spans of the table header as well

* Support nested table key spans as well
2019-09-16 16:32:45 -05:00
est31 029908cfa6 Remove redundant #[doc(hidden)] attributes (#331) 2019-09-09 13:04:47 -05:00
James Kay 95d419ba99 Nested dotted-table enums (#329)
Add support for deserializing enums from nested dotted tables.
2019-09-05 09:18:26 -05:00