extract out runtime-codec to a separate crate

This commit is contained in:
Robert Habermeier
2018-01-30 18:51:12 +01:00
parent 8e554129ec
commit a68b187f4d
27 changed files with 82 additions and 40 deletions
@@ -24,7 +24,7 @@ use codec::{Slicable, KeyedVec};
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
pub fn get<T: Slicable + Sized>(key: &[u8]) -> Option<T> {
Slicable::set_as_slice(&|out, offset|
Slicable::set_as_slice(|out, offset|
runtime_std::read_storage(&twox_128(key)[..], out, offset) >= out.len()
)
}