Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line/column numbers? #11

Open
Diggsey opened this issue Aug 2, 2021 · 1 comment
Open

Line/column numbers? #11

Diggsey opened this issue Aug 2, 2021 · 1 comment

Comments

@Diggsey
Copy link

Diggsey commented Aug 2, 2021

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.

@gilescope
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants