Skip to content

Commit 623161e

Browse files
authored
fix: Revert deref change
Revert the addition of a deref in PR #1192 by me, which should not be there. Apologies for the inconvenience caused.
1 parent b17295b commit 623161e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/conversions/as_ref_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn char_counter<T>(arg: T) -> usize {
1717
arg.as_ref().chars().count()
1818
}
1919

20-
// Squares a number using AsMut. Add the trait bound as is appropriate and
20+
// Squares a number using as_mut(). Add the trait bound as is appropriate and
2121
// implement the function body.
2222
fn num_sq<T>(arg: &mut T) {
2323
???
@@ -54,7 +54,7 @@ mod tests {
5454
#[test]
5555
fn mult_box() {
5656
let mut num: Box<u32> = Box::new(3);
57-
num_sq(&mut *num);
57+
num_sq(&mut num);
5858
assert_eq!(*num, 9);
5959
}
6060
}

0 commit comments

Comments
 (0)