serde-ignored icon indicating copy to clipboard operation
serde-ignored copied to clipboard

Line/column numbers?

Open Diggsey opened this issue 2 years ago • 1 comments

Is there any way to get the spans of the ignored keys?

The only way I can think of doing this right now would be to copy what this crate does, but instead of creating a Path, try to deserialize a toml::Spanned<toml::Value> at the ignored key.

Diggsey avatar Aug 02 '21 02:08 Diggsey

I'm trying to get toml::Spanned and serde_ignored to work nicely together at the moment. I keep getting it fail saying it expects "a borrowed string" when deserialising cargo tomls: dependencies: Option<BTreeMap<String, Spanned<TomlDependency>>>,.

The SpannedVisitor delegate chain seems to get broken in serde here: deserializer.deserialize_str(StrVisitor). It's a bit hard to see what's going on but I think CaptureKey is maybe where things are going pair shaped.

gilescope avatar Aug 11 '21 08:08 gilescope