clippy
This commit is contained in:
parent
f3910c329b
commit
1b4e1670f7
@ -81,11 +81,7 @@ where
|
||||
|
||||
let result: Vec<Option<<R as EntityTrait>::Model>> = keys
|
||||
.iter()
|
||||
.map(|key| {
|
||||
hashmap
|
||||
.get(&format!("{:?}", key))
|
||||
.and_then(|val| Some(val.clone()))
|
||||
})
|
||||
.map(|key| hashmap.get(&format!("{:?}", key)).cloned())
|
||||
.collect();
|
||||
|
||||
Ok(result)
|
||||
@ -143,8 +139,8 @@ where
|
||||
.map(|key: &ValueTuple| {
|
||||
hashmap
|
||||
.get(&format!("{:?}", key))
|
||||
.and_then(|val| Some(val.clone()))
|
||||
.unwrap_or_else(|| vec![])
|
||||
.cloned()
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user