Skip to content
Snippets Groups Projects
Commit 2ffad625 authored by Tomasz Drwięga's avatar Tomasz Drwięga Committed by GitHub
Browse files

Make sure to use the optimized method instead of reading the storage. (#7445)

parent be1bc19b
No related merge requests found
......@@ -83,7 +83,7 @@ pub fn take_or_else<T: Decode + Sized, F: FnOnce() -> T>(key: &[u8], default_val
/// Check to see if `key` has an explicit entry in storage.
pub fn exists(key: &[u8]) -> bool {
sp_io::storage::read(key, &mut [0;0][..], 0).is_some()
sp_io::storage::exists(key)
}
/// Ensure `key` has no explicit entry in storage.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment