mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
fix clippy (#715)
* fix clippy * remove used id in codegen * fix clippy again
This commit is contained in:
@@ -92,14 +92,13 @@ impl<'a> TypeGenerator<'a> {
|
||||
let mut root_mod =
|
||||
Module::new(self.types_mod_ident.clone(), self.types_mod_ident.clone());
|
||||
|
||||
for (id, ty) in self.type_registry.types().iter().enumerate() {
|
||||
for ty in self.type_registry.types().iter() {
|
||||
if ty.ty().path().namespace().is_empty() {
|
||||
// prelude types e.g. Option/Result have no namespace, so we don't generate them
|
||||
continue
|
||||
}
|
||||
self.insert_type(
|
||||
ty.ty().clone(),
|
||||
id as u32,
|
||||
ty.ty().path().namespace().to_vec(),
|
||||
&self.types_mod_ident,
|
||||
&mut root_mod,
|
||||
@@ -112,7 +111,6 @@ impl<'a> TypeGenerator<'a> {
|
||||
fn insert_type(
|
||||
&'a self,
|
||||
ty: Type<PortableForm>,
|
||||
id: u32,
|
||||
path: Vec<String>,
|
||||
root_mod_ident: &Ident,
|
||||
module: &mut Module,
|
||||
@@ -136,7 +134,7 @@ impl<'a> TypeGenerator<'a> {
|
||||
TypeDefGen::from_type(ty, self, &self.crate_path),
|
||||
);
|
||||
} else {
|
||||
self.insert_type(ty, id, path[1..].to_vec(), root_mod_ident, child_mod)
|
||||
self.insert_type(ty, path[1..].to_vec(), root_mod_ident, child_mod)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user