From 6183b57f32185ad257d79d7bb5a3223a84e7669c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 27 Oct 2020 17:14:48 +0100 Subject: [PATCH] Make sure to use the optimized method instead of reading the storage. --- frame/support/src/storage/unhashed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/support/src/storage/unhashed.rs b/frame/support/src/storage/unhashed.rs index 34b146b86f6ba..42f21cab4993a 100644 --- a/frame/support/src/storage/unhashed.rs +++ b/frame/support/src/storage/unhashed.rs @@ -83,7 +83,7 @@ pub fn take_or_else 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.