mirror of
https://github.com/rust-lang/mdBook
synced 2025-03-04 23:27:17 +00:00
Remove needless scope
This commit is contained in:
parent
a9dae326fa
commit
3a0eeb4bbb
1 changed files with 4 additions and 6 deletions
|
@ -540,12 +540,10 @@ 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(value) = Value::try_from(value) {
|
||||
let _ = raw.insert(key, value);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if let Ok(updated) = raw.try_into() {
|
||||
|
|
Loading…
Add table
Reference in a new issue