From db5911eb739d79c9b6fd44a510d77c6b80f49368 Mon Sep 17 00:00:00 2001 From: mo8it Date: Fri, 5 Jul 2024 15:31:39 +0200 Subject: [PATCH] Use *= --- solutions/23_conversions/as_ref_mut.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/23_conversions/as_ref_mut.rs b/solutions/23_conversions/as_ref_mut.rs index 91b12ba..af62e2d 100644 --- a/solutions/23_conversions/as_ref_mut.rs +++ b/solutions/23_conversions/as_ref_mut.rs @@ -15,7 +15,7 @@ fn char_counter>(arg: T) -> usize { // Squares a number using `as_mut()`. fn num_sq>(arg: &mut T) { let arg = arg.as_mut(); - *arg = *arg * *arg; + *arg *= *arg; } fn main() {