Skip to content

Commit

Permalink
fix 1.84 clippy warnings (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw authored Jan 15, 2025
1 parent b65aa62 commit a437b05
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion description/src/type_example/rust_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub type TyMiddleware =
/// Middleware for a `CodeTransformer` to convert a type path encountered into a different type path.
pub type TyPathMiddleware = Box<dyn Fn(TokenStream) -> TokenStream>;

impl<'a> CodeTransformer<'a> {
impl CodeTransformer<'_> {
/// resolves a type path, removes the generic bits, e.g. `Foo<T, R>` becomes `Foo`,
/// and, if the correct ty_path_middleware is set, prunes the resulting type path.
fn resolve_type_path_omit_generics(&self, type_id: u32) -> anyhow::Result<TokenStream> {
Expand Down
2 changes: 1 addition & 1 deletion typegen/src/typegen/ir/module_ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ impl ModuleIR {
.children
.entry(child_ident.clone())
.or_insert_with(|| ModuleIR::new(child_ident, self.root_mod.clone()));
return child.get_or_insert_submodule(&namespace[1..]);
child.get_or_insert_submodule(&namespace[1..])
}
}
4 changes: 2 additions & 2 deletions typegen/src/typegen/settings/substitutes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ fn is_absolute(path: &syn::Path) -> bool {
|| path
.segments
.first()
.map_or(false, |segment| segment.ident == "crate")
.is_some_and(|segment| segment.ident == "crate")
}

/// tries to convert a [`syn::Path`] into an `AbsolutePath`. Only succeeds if the path is not a relative path.
Expand All @@ -374,7 +374,7 @@ pub trait TryIntoSynPath {
fn syn_path(self) -> Option<syn::Path>;
}

impl<'a> TryIntoSynPath for &'a scale_info::Path<PortableForm> {
impl TryIntoSynPath for &scale_info::Path<PortableForm> {
fn syn_path(self) -> Option<syn::Path> {
if self.segments.is_empty() {
return None;
Expand Down

0 comments on commit a437b05

Please sign in to comment.