diff options
| author | Arkid <39987510+aaarkid@users.noreply.github.com> | 2022-10-21 02:45:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-21 02:45:31 +0200 |
| commit | 623161e50dd8dc1960452c7e5bd7d66bfbab483f (patch) | |
| tree | 0cc38b8a2a463d7375d22fc12ab8b974400acdee | |
| parent | b17295b36fbfa02f4068a71502dba015b6f20b7d (diff) | |
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.
| -rw-r--r-- | exercises/conversions/as_ref_mut.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/conversions/as_ref_mut.rs b/exercises/conversions/as_ref_mut.rs index dafbdb9..c9eed7d 100644 --- a/exercises/conversions/as_ref_mut.rs +++ b/exercises/conversions/as_ref_mut.rs @@ -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) { ??? @@ -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); } } |
