Skip to content

Commit bfee982

Browse files
committed
Fix clippy::toplevel_ref_arg at stack! callsites
`let x = &y` is preferred over `let ref x = y`
1 parent 96c5d87 commit bfee982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nalgebra-macros/src/stack_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn stack_impl(matrix: Matrix) -> syn::Result<TokenStream2> {
2626
let ident_block = format_ident!("{prefix}_stack_{i}_{j}_block");
2727
let ident_shape = format_ident!("{prefix}_stack_{i}_{j}_shape");
2828
output.extend(std::iter::once(quote_spanned! {expr.span()=>
29-
let ref #ident_block = #expr;
29+
let #ident_block = &(#expr);
3030
let #ident_shape = #ident_block.shape_generic();
3131
}));
3232
}

0 commit comments

Comments
 (0)