mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 09:05:41 +00:00
fix grumbles
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Primitive types.
|
||||
|
||||
use runtime_support::vec::Vec;
|
||||
use runtime_support::prelude::*;
|
||||
use streamreader::StreamReader;
|
||||
use joiner::Joiner;
|
||||
use slicable::{Slicable, NonTrivialSlicable};
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use slicable::Slicable;
|
||||
use endiansensitive::EndianSensitive;
|
||||
use keyedvec::KeyedVec;
|
||||
use runtime_support::vec::Vec;
|
||||
use runtime_support::prelude::*;
|
||||
use runtime_support::{self, twox_128};
|
||||
|
||||
/// Trait for a value which may be stored in the storage DB.
|
||||
@@ -37,7 +37,7 @@ pub trait Storable {
|
||||
/// Remove `key` from storage.
|
||||
pub fn kill(key: &[u8]) { runtime_support::set_storage(&twox_128(key)[..], b""); }
|
||||
|
||||
impl<T: Default + Copy + EndianSensitive + 'static> Storable for T {
|
||||
impl<T: Default + EndianSensitive> Storable for T {
|
||||
fn lookup(key: &[u8]) -> Option<Self> {
|
||||
Slicable::set_as_slice(|out| runtime_support::read_storage(&twox_128(key)[..], out) == out.len())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user