Skip to content

Commit b619456

Browse files
committed
feat momo: Rm unnecessary #[allow(unused_mut)] on generated inner fn
Now that the inner function is actually identical to the original function before passed into `momo`, except for visibility, function name and the lack of function doc. Signed-off-by: Jiahao XU <[email protected]>
1 parent b5f78be commit b619456

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gix-macros/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ fn momo_inner(code: proc_macro2::TokenStream) -> proc_macro2::TokenStream {
276276
parse_quote!({ Self::#inner_ident(#argexprs) })
277277
},
278278
});
279-
quote!(#new_item #[allow(unused_mut)] #new_inner_item)
279+
quote!(#new_item #new_inner_item)
280280
} else {
281281
// Put the new inner function within the function block
282282
// to avoid duplicate function name and support associated
@@ -286,7 +286,6 @@ fn momo_inner(code: proc_macro2::TokenStream) -> proc_macro2::TokenStream {
286286
vis: item_fn.vis,
287287
sig: outer_sig,
288288
block: parse_quote!({
289-
#[allow(unused_mut)]
290289
#new_inner_item
291290

292291
#inner_ident(#argexprs)

0 commit comments

Comments
 (0)