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