No need to convert to string before reference

This commit is contained in:
Tobie Morgan Hitchcock 2022-09-30 21:40:56 +01:00
parent cb7c159d71
commit 79b5ef6411

View file

@ -42,7 +42,7 @@ impl Value {
Ok(())
}
},
Part::Field(f) => match v.get_mut(f.to_raw().as_str()) {
Part::Field(f) => match v.get_mut(f as &str) {
Some(v) if v.is_some() => v.set(ctx, opt, txn, path.next(), val).await,
_ => {
let mut obj = Value::base();