I have a function that does this:
fn my_fn(...) -> Result<MySerdeType> {
...
if let Some(table) = doc.remove("toplevel-key") {
Ok(toml_edit::de::from_item(table)?)
} else {
...
}
}
With the new toml_edit that removed from_item, how do I do this? I see from the changelog that I'm supposed to use toml_edit::de::ValueDeserializer somehow but I couldn't figure out how to wire things up...