-
Notifications
You must be signed in to change notification settings - Fork 109
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
Trouble with non-existing fields #299
Comments
Use |
It's documented in the changelog btw: |
I was just running into fighting this with upgrading I just released 0.13 which improves some consistency with this which made porting easier for me. I'm overall torn on this. In some aspects, always dealing with Right now we are in a mixed state where we deal with I have a branch that explores switching to be more like the Rust stdlib. It greatly simplifies the code and better matches expectations at the cost of extra complexity in some cases for users. |
thanks for the explanation. I should have read the changelog more carefully. |
I just realized that the example from README.md is broken now. Would be good to fix that as well. The original I agree about the downsides of this approach and am wondering what are we trading off here in the API ergonomics with more stdlib API/semantics. |
I've posted what work I've done as #301 so others can play with it. The part that gave me pause as I was working on it was |
is easier to write and to deal with, and maybe I'm also used to that kind of writing (JSON crates), but it has it's drawback. if it returns None, you don't know what part of the "path" is wrong. As far as I'm concerned, the new writing suits me. |
Hi,
This code panic with message 'index not found', meaning it panic before evaluating is_none()
Same code worked well with toml_edit = "0.6.0" :
It stopped working with 0.7 to 0.12.6
If it's not a bug, how can I easily test if a field exists ?
thanks,
The text was updated successfully, but these errors were encountered: