thread 'test_dotted_key' panicked at 'assertion failed: `(left == right)`
Diff < left / right > :
Object(
{
< "name": String(
< "Orange",
> "name": Object(
> {
> "type": String(
> "string",
> ),
> "value": String(
> "Orange",
> ),
> },
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Hash, Clone)]
pub struct KeyComp {
// Repr.raw_value have things like single quotes.
repr: Repr,
key: InternalString,
}
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Hash, Clone)]
pub struct Key {
pub(crate) comp: Vec<KeyComp>,
raw: InternalString,
}
Key.key
is a rust string corresponding to the key, so that we can make a lookup on a table, independent of the it's representation in toml, e.g. toml "\t key"
and ' key'
have the same "rust" key representation, but differ in raw field.
"
double quotes. So you can create e.g. value("'0.2'")
, see this method.
toml_edit
and we were planning on reading through the toml v0.5
spec and figuring out what needs to be changed in toml_edit
to support all of the v0.5
spec. If anyone could point us to a specific part of the spec we need to add support for to help us get started faster, that would be much appreciated
Item
as struct with a private enum field. On the other hand, I'm not yet convinced dotted key should be part of the Item
, since the former conceptually represents a key (to the left of =
) and the latter is meant for the value (rhs). If I knew what to put where exactly, I would've probably implemented this myself already :) The problem is, I don't have much free time nowadays, but, hopefully, someday I'll manage my time more efficiently :)