Age | Commit message (Collapse) | Author | Lines |
|
|
|
* Speed up array code
* Speed up map code too
Also add regression test
* Use more obvious closure notation
* Document the builder functions
|
|
* "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
|
|
Follow the footsteps of serde_json!
Closes #348
|
|
* 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
|
|
Close #310.
|
|
|
|
* 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
|
|
* 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
|
|
|
|
Add support for deserializing enums from nested dotted tables.
|
|
|
|
Not sure why this wasn't implemented before, since `ser::Error` has implemented `PartialEq` and `Eq` as of PR #144.
|
|
|
|
std::fmt::Errors are now converted to ser::Errors via ser::Error::custom
|
|
Created an alias named TablePair being a (Cow<'a, str>, Value<'a>)
|
|
Calling the write!, the result that it returns doesn't matter or wasn't
deemed as important and was dropped before. This was just removed and
then the unused Result is ignored via clippy attribute. This is a
plausible solution to get past the Clippy Error, but others may be more
ideal.
|
|
Majority of warnings removed via RustFix
Two remain one being a long return type and another being a name
suggestion from Clippy `to_owned` for MaybeString
|
|
|
|
Removed matches that were used to compare Enum variants for equality in
favor of using discriminant from https://doc.rust-lang.org/std/mem/fn.discriminant.html
introduced in Rust 1.21.0
|
|
Should any other traits be derived?
|
|
|
|
|
|
Allow conversion from de::Error to std::io::error
|
|
Add line and column to all Errors
|
|
|
|
The `Spanned` struct was originally included in the docs as a re-export,
but rustdoc doesn't render re-exports if the module from which it's
exported isn't documented.
Since `Spanned` is the only public item inside the `spanned` module this
commit shows the struct as a normal item in the index, and moves the
example from the module docs to the struct docs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix warnings for deprecated usages of trim_{left,right}_matches.
|
|
|
|
|
|
The previous implementation of `read_string`, when looking for
delimiters ending the multi-line string and failing to find exactly
three in succession, always put a single delimiter back. This is
incorrect when exactly two delimiters are present.
Put back the correct number of delimiters depending on how many have
been already consumed from input.
The issue could be triggered only with `Owned` representation of
`MaybeString`, since otherwise `push` operation is no-op.
|
|
Add PartialEq trait to Error, ErrorInner and ErrorKind.
Relevant issue: https://github.com/alexcrichton/toml-rs/issues/291
|
|
|
|
Add the preserve_order feature (rebased version)
|
|
This commit fixes #279 where a case of duplicate table headers slipped
through the cracks. This also adds an option to disable this new
validation to allow Cargo to preserve backwards compatibility.
|
|
|
|
|
|
Issue 255: Externally tagged enum deserialization
|
|
Indicate this is now supporting version 0.5 of TOML.
|
|
|
|
The space between date and time was being eagerly skipped when it shouldn't.
|