Prepare for latest clippy (nightly 09-10-2022) (#12466)

This commit is contained in:
Bastian Köcher
2022-10-18 12:07:02 +02:00
committed by GitHub
parent 8671fb7615
commit 738dc8460e
15 changed files with 28 additions and 32 deletions
@@ -157,8 +157,8 @@ where
fn from((inners, state_version): (Storage, StateVersion)) -> Self {
let mut inner: HashMap<Option<ChildInfo>, BTreeMap<StorageKey, StorageValue>> = inners
.children_default
.into_iter()
.map(|(_k, c)| (Some(c.child_info), c.data))
.into_values()
.map(|c| (Some(c.child_info), c.data))
.collect();
inner.insert(None, inners.top);
(inner, state_version).into()
@@ -474,7 +474,7 @@ impl OverlayedChanges {
pub fn children(
&self,
) -> impl Iterator<Item = (impl Iterator<Item = (&StorageKey, &OverlayedValue)>, &ChildInfo)> {
self.children.iter().map(|(_, v)| (v.0.changes(), &v.1))
self.children.values().map(|v| (v.0.changes(), &v.1))
}
/// Get an iterator over all top changes as been by the current transaction.