We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b17295b + 623161e commit 24da5b3Copy full SHA for 24da5b3
exercises/conversions/as_ref_mut.rs
@@ -17,7 +17,7 @@ fn char_counter<T>(arg: T) -> usize {
17
arg.as_ref().chars().count()
18
}
19
20
-// Squares a number using AsMut. Add the trait bound as is appropriate and
+// Squares a number using as_mut(). Add the trait bound as is appropriate and
21
// implement the function body.
22
fn num_sq<T>(arg: &mut T) {
23
???
@@ -54,7 +54,7 @@ mod tests {
54
#[test]
55
fn mult_box() {
56
let mut num: Box<u32> = Box::new(3);
57
- num_sq(&mut *num);
+ num_sq(&mut num);
58
assert_eq!(*num, 9);
59
60
0 commit comments