Remove needless scope
This commit is contained in:
parent
a9dae326fa
commit
3a0eeb4bbb
|
@ -540,13 +540,11 @@ trait Updateable<'de>: Serialize + Deserialize<'de> {
|
|||
fn update_value<S: Serialize>(&mut self, key: &str, value: S) {
|
||||
let mut raw = Value::try_from(&self).expect("unreachable");
|
||||
|
||||
{
|
||||
if let Ok(value) = Value::try_from(value) {
|
||||
let _ = raw.insert(key, value);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(updated) = raw.try_into() {
|
||||
*self = updated;
|
||||
|
|
Loading…
Reference in New Issue