mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
Check docs and run clippy on PRs (#326)
* Check docs, clippy, test run * test parallel CI adapted from other package; is it faster? * Remember to download substrate * Nightly for cargo fmt * Standardise CI names * fix clippy complaints * Ensure docs are valid and export publicly accessible types * all-targets clippy, and fix additional lint errors * newline in ci file
This commit is contained in:
@@ -44,7 +44,7 @@ pub fn generate_storage(
|
||||
let (storage_structs, storage_fns): (Vec<_>, Vec<_>) = storage
|
||||
.entries
|
||||
.iter()
|
||||
.map(|entry| generate_storage_entry_fns(&type_gen, &pallet, entry))
|
||||
.map(|entry| generate_storage_entry_fns(type_gen, pallet, entry))
|
||||
.unzip();
|
||||
|
||||
quote! {
|
||||
|
||||
+5
-8
@@ -88,12 +88,9 @@ impl From<syn::Item> for Item {
|
||||
let meta = attr.parse_meta().unwrap_or_else(|e| {
|
||||
abort!(attr.span(), "Error parsing attribute: {}", e)
|
||||
});
|
||||
let substitute_type_args =
|
||||
<attrs::Subxt as darling::FromMeta>::from_meta(&meta)
|
||||
.unwrap_or_else(|e| {
|
||||
abort!(attr.span(), "Error parsing attribute meta: {}", e)
|
||||
});
|
||||
substitute_type_args
|
||||
<attrs::Subxt as darling::FromMeta>::from_meta(&meta).unwrap_or_else(
|
||||
|e| abort!(attr.span(), "Error parsing attribute meta: {}", e),
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
if substitute_attrs.len() > 1 {
|
||||
@@ -102,11 +99,11 @@ impl From<syn::Item> for Item {
|
||||
"Duplicate `substitute_type` attributes"
|
||||
)
|
||||
}
|
||||
if let Some(attr) = substitute_attrs.iter().next() {
|
||||
if let Some(attr) = substitute_attrs.get(0) {
|
||||
let use_path = &use_.tree;
|
||||
let substitute_with: syn::TypePath = syn::parse_quote!( #use_path );
|
||||
let type_substitute = SubxtItem::TypeSubstitute {
|
||||
generated_type_path: attr.substitute_type().to_string(),
|
||||
generated_type_path: attr.substitute_type(),
|
||||
substitute_with,
|
||||
};
|
||||
Self::Subxt(type_substitute)
|
||||
|
||||
Reference in New Issue
Block a user