Closed epage closed 2 years ago
I'd propose we have a
enum Item {
Literal(String),
Other(String),
}
(obviously some naming could be improved)
We could have some impl From
s to keep the API compatible.
I'm willing to implement this, just looking for a go ahead.
It would be a breaking change to make this change to the "easy errors" now and I am not willing to do that for just this (the error handling could use an overhaul though). So you may need to implement your own errors, or convert the easy errors before displaying them.
In looking to see if there was a way to do this without a breaking change, it turned out combine
already has all the information it needs. In case you weren't referring to the formatting change as a breaking change (since most textual outputs are not considered stable and stability wasn't mentioned for #333), I am preparing a PR with the change. At least within combine's docs, it works exactly as expected!
toml_edit sets some
expected
for not what character is next but what grammar item is expected (e.g. "key").This means they are quoted, like literals. See review comments on https://github.com/rust-lang/cargo/pull/10086