Skip to content

Commit cafdef5

Browse files
committed
Move to new slice syntax
This fixes some warnings.
1 parent 95cbd48 commit cafdef5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ fn times_two(n: u32) -> u32 {
2525

2626
#[test]
2727
fn test_basic() {
28-
assert_eq!(STRING.as_slice(), "hello");
28+
assert_eq!(&STRING[..], "hello");
2929
assert_eq!(*NUMBER, 6);
3030
assert!(HASHMAP.get(&1).is_some());
3131
assert!(HASHMAP.get(&3).is_none());
32-
assert_eq!(ARRAY_BOXES.as_slice(), [Box::new(1), Box::new(2), Box::new(3)].as_slice());
32+
assert_eq!(&ARRAY_BOXES[..], &[Box::new(1), Box::new(2), Box::new(3)][..]);
3333
}
3434

3535
#[test]

0 commit comments

Comments
 (0)