mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 13:48:04 +00:00
Remove unneeded Config bounds and BlockNumber associated type (#804)
* remove unneeded Config bounds and BlockNumber associated type * clippy and fmt
This commit is contained in:
@@ -370,8 +370,8 @@ impl RuntimeGenerator {
|
||||
}
|
||||
|
||||
/// Return a vector of tuples of variant names and corresponding struct definitions.
|
||||
pub fn generate_structs_from_variants<'a, F>(
|
||||
type_gen: &'a TypeGenerator,
|
||||
pub fn generate_structs_from_variants<F>(
|
||||
type_gen: &TypeGenerator,
|
||||
type_id: u32,
|
||||
variant_to_struct_name: F,
|
||||
error_message_type_name: &str,
|
||||
|
||||
@@ -131,7 +131,7 @@ impl<'a> TypeGenerator<'a> {
|
||||
pub fn resolve_type(&self, id: u32) -> Type<PortableForm> {
|
||||
self.type_registry
|
||||
.resolve(id)
|
||||
.unwrap_or_else(|| panic!("No type with id {} found", id))
|
||||
.unwrap_or_else(|| panic!("No type with id {id} found"))
|
||||
.clone()
|
||||
}
|
||||
|
||||
@@ -403,10 +403,7 @@ impl ToTokens for CratePath {
|
||||
impl From<&str> for CratePath {
|
||||
fn from(crate_path: &str) -> Self {
|
||||
Self(syn::Path::from_string(crate_path).unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"failed converting {:?} to `syn::Path`: {:?}",
|
||||
crate_path, err
|
||||
);
|
||||
panic!("failed converting {crate_path:?} to `syn::Path`: {err:?}");
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ impl TypePathType {
|
||||
"BTreeSet" => parse_quote!(::std::collections::BTreeSet),
|
||||
"Range" => parse_quote!(::core::ops::Range),
|
||||
"RangeInclusive" => parse_quote!(::core::ops::RangeInclusive),
|
||||
ident => panic!("Unknown prelude type '{}'", ident),
|
||||
ident => panic!("Unknown prelude type '{ident}'"),
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
|
||||
Reference in New Issue
Block a user