diff --git a/nalgebra-macros/src/lib.rs b/nalgebra-macros/src/lib.rs index 722323f8b..e209ef687 100644 --- a/nalgebra-macros/src/lib.rs +++ b/nalgebra-macros/src/lib.rs @@ -12,8 +12,7 @@ future_incompatible, missing_copy_implementations, missing_debug_implementations, - clippy::all, - clippy::pedantic + clippy::all )] mod matrix_vector_impl; @@ -256,5 +255,5 @@ pub fn point(stream: TokenStream) -> TokenStream { #[proc_macro] pub fn stack(stream: TokenStream) -> TokenStream { let matrix = parse_macro_input!(stream as Matrix); - proc_macro::TokenStream::from(stack_impl(matrix).unwrap_or_else(|err| err.into_compile_error())) + proc_macro::TokenStream::from(stack_impl(matrix).unwrap_or_else(syn::Error::into_compile_error)) } diff --git a/nalgebra-macros/src/stack_impl.rs b/nalgebra-macros/src/stack_impl.rs index caaa50819..eaa441332 100644 --- a/nalgebra-macros/src/stack_impl.rs +++ b/nalgebra-macros/src/stack_impl.rs @@ -42,7 +42,7 @@ pub fn stack_impl(matrix: Matrix) -> syn::Result { let dim = (0 ..n_block_cols) .filter_map(|j| { let expr = &matrix[(i, j)]; - if !is_literal_zero(&expr) { + if !is_literal_zero(expr) { let mut ident_shape = format_ident!("{}_stack_{}_{}_shape", prefix, i, j); ident_shape.set_span(ident_shape.span().located_at(expr.span())); Some(quote_spanned!{expr.span()=> #ident_shape.0 }) @@ -79,7 +79,7 @@ pub fn stack_impl(matrix: Matrix) -> syn::Result { let dim = (0 ..n_block_rows) .filter_map(|i| { let expr = &matrix[(i, j)]; - if !is_literal_zero(&expr) { + if !is_literal_zero(expr) { let mut ident_shape = format_ident!("{}_stack_{}_{}_shape", prefix, i, j); ident_shape.set_span(ident_shape.span().located_at(expr.span())); Some(quote_spanned!{expr.span()=> #ident_shape.1 }) @@ -223,7 +223,7 @@ mod tests { matrix }}; - assert_eq!(format!("{}", result), format!("{}", expected)); + assert_eq!(format!("{result}"), format!("{}", expected)); } #[test] @@ -297,6 +297,6 @@ mod tests { matrix }}; - assert_eq!(format!("{}", result), format!("{}", expected)); + assert_eq!(format!("{result}"), format!("{}", expected)); } }