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() {