extract out runtime-codec to a separate crate

This commit is contained in:
Robert Habermeier committed 2018-01-30 18:51:12 +01:00
1 parent 8e554129ec
commit a68b187f4d
27 files changed
+82 -40

No files matched your search

@@ -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()
)
}