relax translate closure to FnMut (#8019)

This commit is contained in:
Alexander Popiak
2021-02-01 17:09:54 +01:00
committed by GitHub
parent 3006100977
commit 49e853c146
5 changed files with 9 additions and 9 deletions
@@ -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)