mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-26 15:24:17 -05:00
Merge pull request #1192 from aaarkid/patch-1
fix: Add a deref in the test code
This commit is contained in:
commit
49a101b189
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn mult_box() {
|
fn mult_box() {
|
||||||
let mut num: Box<u32> = Box::new(3);
|
let mut num: Box<u32> = Box::new(3);
|
||||||
num_sq(&mut num);
|
num_sq(&mut *num);
|
||||||
assert_eq!(*num, 9);
|
assert_eq!(*num, 9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue