Skip to content

Commit

Permalink
lint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder83singh committed Oct 6, 2023
1 parent 3359b65 commit 851e90f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wallet/core/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ where
None
};

let list =
list.unwrap_or(Value::Object(Map::from_iter(<K as DefaultSettings>::defaults().await.into_iter().map(|(k, v)| {
let list = if let Some(value) = list {
value
} else {
Value::Object(Map::from_iter(<K as DefaultSettings>::defaults().await.into_iter().map(|(k, v)| {
let ks = to_value(k).unwrap();
let ks = ks.as_str().expect("Unable to convert key to string");

(ks.to_string(), v)
}))));
})))
};

self.map.clear();
if let Value::Object(map) = list {
Expand Down

0 comments on commit 851e90f

Please sign in to comment.