diff options
author | Christian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com> | 2022-11-02 13:32:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 13:32:32 -0500 |
commit | 83426897af20d938fb4dca879d54de456ab96d6b (patch) | |
tree | 0aaa72e7d417aced81b5727e7038b5c103925d3f /bindgen/codegen/mod.rs | |
parent | a2fe04cbafaf0c7b40979e1cc505a90d76f4d099 (diff) |
Fix clippy warnings (#2331)
Diffstat (limited to 'bindgen/codegen/mod.rs')
-rw-r--r-- | bindgen/codegen/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs index 7e0d7aa0..bf0b3356 100644 --- a/bindgen/codegen/mod.rs +++ b/bindgen/codegen/mod.rs @@ -85,7 +85,7 @@ fn root_import( let mut path = top_level_path(ctx, module); let root = ctx.root_module().canonical_name(ctx); - let root_ident = ctx.rust_ident(&root); + let root_ident = ctx.rust_ident(root); path.push(quote! { #root_ident }); let mut tokens = quote! {}; @@ -797,7 +797,7 @@ impl CodeGenerator for Type { } }; - let rust_name = ctx.rust_ident(&name); + let rust_name = ctx.rust_ident(name); let mut tokens = if let Some(comment) = item.comment(ctx) { attributes::doc(comment) @@ -1076,7 +1076,7 @@ impl<'a> CodeGenerator for Vtable<'a> { ) { assert_eq!(item.id(), self.item_id); debug_assert!(item.is_enabled_for_codegen(ctx)); - let name = ctx.rust_ident(&self.canonical_name(ctx)); + let name = ctx.rust_ident(self.canonical_name(ctx)); // For now, we will only generate vtables for classes that: // - do not inherit from others (compilers merge VTable from primary parent class). @@ -1582,7 +1582,7 @@ impl<'a> FieldCodegen<'a> for BitfieldUnit { { let align_field_name = format!("_bitfield_align_{}", self.nth()); - let align_field_ident = ctx.rust_ident(&align_field_name); + let align_field_ident = ctx.rust_ident(align_field_name); let align_ty = match self.layout().align { n if n >= 8 => quote! { u64 }, 4 => quote! { u32 }, @@ -3875,7 +3875,7 @@ impl TryToRustTy for Type { } TypeKind::TypeParam => { let name = item.canonical_name(ctx); - let ident = ctx.rust_ident(&name); + let ident = ctx.rust_ident(name); Ok(quote! { #ident }) |