Closed
Description
Hi,
fn main() {
let toml = r#"[package]
name = "test"
version = "0.1.0"
edition = "2021"
"#;
let doc = toml.parse::<Document>().expect("invalid doc");
dbg!(&doc["package"]["resolver"].is_none());
}
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" :
[src/main.rs:12] &doc["package"]["resolver"].is_none() = true
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,