Refactor sr_primitives. (#3214)

* refactor sr_primitives.

* Fix try build error.

* Line-width

* Ui test.

* Final fixes.

* Fix build again.

* bring back ui test.

* Fix unsigned import.

* Another ui fix.

* Also refactor substrate-primitives

* Fix benchmarks.

* Fix doc test.

* fix doc tests
This commit is contained in:
Kian Paimani
2019-07-29 14:43:53 +02:00
committed by Bastian Köcher
parent cf80af9255
commit 79feb23a22
259 changed files with 667 additions and 665 deletions
@@ -531,8 +531,8 @@ fn decl_store_extra_genesis(
impl#fparam_impl GenesisConfig#sparam #genesis_where_clause {
pub fn build_storage #fn_generic (self) -> std::result::Result<
(
#scrate::runtime_primitives::StorageOverlay,
#scrate::runtime_primitives::ChildrenStorageOverlay,
#scrate::sr_primitives::StorageOverlay,
#scrate::sr_primitives::ChildrenStorageOverlay,
),
String
> #fn_where_clause {
@@ -545,8 +545,8 @@ fn decl_store_extra_genesis(
/// Assimilate the storage for this module into pre-existing overlays.
pub fn assimilate_storage #fn_generic (
self,
r: &mut #scrate::runtime_primitives::StorageOverlay,
c: &mut #scrate::runtime_primitives::ChildrenStorageOverlay,
r: &mut #scrate::sr_primitives::StorageOverlay,
c: &mut #scrate::sr_primitives::ChildrenStorageOverlay,
) -> std::result::Result<(), String> #fn_where_clause {
let storage = r;
@@ -559,13 +559,13 @@ fn decl_store_extra_genesis(
}
#[cfg(feature = "std")]
impl#build_storage_impl #scrate::runtime_primitives::#impl_trait
impl#build_storage_impl #scrate::sr_primitives::#impl_trait
for GenesisConfig#sparam #build_storage_where_clause
{
fn build_module_genesis_storage(
self,
r: &mut #scrate::runtime_primitives::StorageOverlay,
c: &mut #scrate::runtime_primitives::ChildrenStorageOverlay,
r: &mut #scrate::sr_primitives::StorageOverlay,
c: &mut #scrate::sr_primitives::ChildrenStorageOverlay,
) -> std::result::Result<(), String> {
self.assimilate_storage::<#fn_traitinstance> (r, c)
}