Refactor decl storage (#3765)

* split implementation in multiple files:
  * transformation -> genesis_config/  getters.rs  instance_trait.rs  metadata.rs  mod.rs  store_trait.rs
  * mod.rs -> parser.rs
  * impl.rs -> storage_struct.rs
* parser is isolated into parse module, it could be improved as well but this can be done in another PR
* modules contains a defintion of decl_storage input which must be ok to work with.
* implementation change:
  * T: Trait might be more often bound to 'static (anyway we only use static one and it is needed for metadata current implementation).
  * GenesisConfig no longer requires its fields to be Clone (possible since to EncodeLike feature)
  * builder for map storages must return precise type Vec<(key, value)>
This commit is contained in:
thiolliere
2019-10-16 15:47:46 +02:00
committed by GitHub
parent dc92631180
commit f4e36f0d74
15 changed files with 1982 additions and 1862 deletions
+1 -1
View File
@@ -213,5 +213,5 @@ use proc_macro::TokenStream;
///
#[proc_macro]
pub fn decl_storage(input: TokenStream) -> TokenStream {
storage::transformation::decl_storage_impl(input)
storage::decl_storage_impl(input)
}