Refactor srml-support/storage (#3702)

* refactor

* fix

* remove unused vec storages

* address comment
This commit is contained in:
thiolliere
2019-09-27 14:39:14 +02:00
committed by GitHub
parent ff75e498d4
commit 75ed6cc04e
12 changed files with 133 additions and 453 deletions
@@ -15,8 +15,9 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use rstd::prelude::*;
use rstd::borrow::Borrow;
use codec::{Codec, Encode, EncodeAppend};
use crate::{storage::{self, unhashed, hashed::StorageHasher}, rstd::borrow::Borrow};
use crate::{storage::{self, unhashed}, hash::StorageHasher};
/// Generator for `StorageDoubleMap` used by `decl_storage`.
///
@@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use codec::{Codec, Encode, Decode};
use crate::{storage::{self, unhashed, hashed::StorageHasher}, traits::Len};
use crate::{storage::{self, unhashed}, hash::StorageHasher, traits::Len};
use rstd::{
borrow::Borrow,
marker::PhantomData,
@@ -18,7 +18,7 @@
use rstd::prelude::*;
use rstd::borrow::Borrow;
use codec::{Codec, Encode};
use crate::{storage::{self, unhashed, hashed::StorageHasher}, traits::Len};
use crate::{storage::{self, unhashed}, hash::StorageHasher, traits::Len};
/// Generator for `StorageMap` used by `decl_storage`.
///
@@ -18,7 +18,7 @@
use rstd::prelude::*;
use rstd::{borrow::Borrow, iter::FromIterator};
use codec::{Codec, Encode};
use crate::{storage::{self, unhashed, hashed::{Twox128, StorageHasher}}, traits::Len};
use crate::{storage::{self, unhashed}, hash::{Twox128, StorageHasher}, traits::Len};
/// Generator for `StorageValue` used by `decl_storage`.
///