Skip to content

Commit

Permalink
fix: Revert deref change
Browse files Browse the repository at this point in the history
Revert the addition of a deref in PR rust-lang#1192 by me, which should not be there.

Apologies for the inconvenience caused.
  • Loading branch information
aaarkid authored Oct 21, 2022
1 parent b17295b commit 623161e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/conversions/as_ref_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn char_counter<T>(arg: T) -> usize {
arg.as_ref().chars().count()
}

// 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
// implement the function body.
fn num_sq<T>(arg: &mut T) {
???
Expand Down Expand Up @@ -54,7 +54,7 @@ mod tests {
#[test]
fn mult_box() {
let mut num: Box<u32> = Box::new(3);
num_sq(&mut *num);
num_sq(&mut num);
assert_eq!(*num, 9);
}
}

0 comments on commit 623161e

Please sign in to comment.