relax translate closure to FnMut (#8019)

This commit is contained in:
Alexander Popiak authored and GitHub committed 2021-02-01 16:09:54 +00:00
1 parent 3006100977
commit 49e853c146
5 files changed
+9 -9

No files matched your search

@@ -383,7 +383,7 @@ impl<
iterator
}
fn translate<O: Decode, F: Fn(K1, K2, O) -> Option<V>>(f: F) {
fn translate<O: Decode, F: FnMut(K1, K2, O) -> Option<V>>(mut f: F) {
let prefix = G::prefix_hash();
let mut previous_key = prefix.clone();
while let Some(next) = sp_io::storage::next_key(&previous_key)
@@ -162,7 +162,7 @@ impl<
iterator
}
fn translate<O: Decode, F: Fn(K, O) -> Option<V>>(f: F) {
fn translate<O: Decode, F: FnMut(K, O) -> Option<V>>(mut f: F) {
let prefix = G::prefix_hash();
let mut previous_key = prefix.clone();
while let Some(next) = sp_io::storage::next_key(&previous_key)