mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Fix linked map for trait types and Option (#1809)
* Fix linked map for traits. * Fix Option<_> variant. * Improve naming a tad * Rebuild runtime * Encapsulate private data in the inner module. * Bump impl version. * Fix deriving codec in srml-example. * Fix derivation without importing parity-codec-derive. * Fix config() for map.
This commit is contained in:
@@ -345,7 +345,7 @@ pub trait EnumerableStorageMap<K: Codec, V: Codec>: StorageMap<K, V> {
|
||||
fn head() -> Option<K>;
|
||||
|
||||
/// Enumerate all elements in the map.
|
||||
fn enumerate() -> Box<dyn Iterator<Item = (K, V)>>;
|
||||
fn enumerate() -> Box<dyn Iterator<Item = (K, V)>> where K: 'static, V: 'static;
|
||||
}
|
||||
|
||||
impl<K: Codec, V: Codec, U> EnumerableStorageMap<K, V> for U where U: generator::EnumerableStorageMap<K, V> {
|
||||
@@ -353,7 +353,7 @@ impl<K: Codec, V: Codec, U> EnumerableStorageMap<K, V> for U where U: generator:
|
||||
<U as generator::EnumerableStorageMap<K, V>>::head(&RuntimeStorage)
|
||||
}
|
||||
|
||||
fn enumerate() -> Box<dyn Iterator<Item = (K, V)>> {
|
||||
fn enumerate() -> Box<dyn Iterator<Item = (K, V)>> where K: 'static, V: 'static {
|
||||
<U as generator::EnumerableStorageMap<K, V>>::enumerate(&RuntimeStorage)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user