Skip to content

Commit eec4ae1

Browse files
committed
codegen: Avoid &String.
1 parent d5ca4e7 commit eec4ae1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/codegen/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2228,7 +2228,7 @@ impl<'a> EnumBuilder<'a> {
22282228
self,
22292229
ctx: &BindgenContext,
22302230
variant: &EnumVariant,
2231-
mangling_prefix: Option<&String>,
2231+
mangling_prefix: Option<&str>,
22322232
rust_ty: quote::Tokens,
22332233
result: &mut CodegenResult<'b>,
22342234
) -> Self {
@@ -2548,9 +2548,9 @@ impl CodeGenerator for Enum {
25482548

25492549
let constant_mangling_prefix = if ctx.options().prepend_enum_name {
25502550
if enum_ty.name().is_none() {
2551-
parent_canonical_name.as_ref().map(|n| &*n)
2551+
parent_canonical_name.as_ref().map(|n| &**n)
25522552
} else {
2553-
Some(&name)
2553+
Some(&*name)
25542554
}
25552555
} else {
25562556
None

0 commit comments

Comments
 (0)