Move to new slice syntax

This fixes some warnings.
This commit is contained in:
Drew Crawford 2015-03-06 20:49:26 -06:00
parent 95cbd48c7b
commit cafdef58b9

View File

@ -25,11 +25,11 @@ fn times_two(n: u32) -> u32 {
#[test]
fn test_basic() {
assert_eq!(STRING.as_slice(), "hello");
assert_eq!(&STRING[..], "hello");
assert_eq!(*NUMBER, 6);
assert!(HASHMAP.get(&1).is_some());
assert!(HASHMAP.get(&3).is_none());
assert_eq!(ARRAY_BOXES.as_slice(), [Box::new(1), Box::new(2), Box::new(3)].as_slice());
assert_eq!(&ARRAY_BOXES[..], &[Box::new(1), Box::new(2), Box::new(3)][..]);
}
#[test]