Remove needless scope

This commit is contained in:
Jeremy Stucki 2019-06-20 14:29:14 +02:00
parent a9dae326fa
commit 3a0eeb4bbb
No known key found for this signature in database
GPG Key ID: EEFCA93148042655
1 changed files with 4 additions and 6 deletions

View File

@ -540,12 +540,10 @@ trait Updateable<'de>: Serialize + Deserialize<'de> {
fn update_value<S: Serialize>(&mut self, key: &str, value: S) { fn update_value<S: Serialize>(&mut self, key: &str, value: S) {
let mut raw = Value::try_from(&self).expect("unreachable"); let mut raw = Value::try_from(&self).expect("unreachable");
{ if let Ok(value) = Value::try_from(value) {
if let Ok(value) = Value::try_from(value) { let _ = raw.insert(key, value);
let _ = raw.insert(key, value); } else {
} else { return;
return;
}
} }
if let Ok(updated) = raw.try_into() { if let Ok(updated) = raw.try_into() {