Skip to content

Commit e94a9db

Browse files
committed
Fix unused_allocation warning in alloc test
1 parent 37c193a commit e94a9db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/alloc/src/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ fn any_move() {
2525

2626
match a.downcast::<i32>() {
2727
Ok(a) => {
28-
assert!(a == Box::new(8));
28+
assert!(*a == 8);
2929
}
3030
Err(..) => panic!(),
3131
}
3232
match b.downcast::<Test>() {
3333
Ok(a) => {
34-
assert!(a == Box::new(Test));
34+
assert!(*a == Test);
3535
}
3636
Err(..) => panic!(),
3737
}

0 commit comments

Comments
 (0)