* "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
* 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
* 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
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
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.
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.