Skip to content

Commit baa81dc

Browse files
committed
Use assert_eq!() instead of assert!(a == b) in slice chunks_mut() unit test
This way more useful information is printed if the test ever fails.
1 parent 8a82e8e commit baa81dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/tests/slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ fn test_mut_chunks() {
11241124
}
11251125
}
11261126
let result = [0, 0, 0, 1, 1, 1, 2];
1127-
assert!(v == result);
1127+
assert_eq!(v, result);
11281128
}
11291129

11301130
#[test]
@@ -1136,7 +1136,7 @@ fn test_mut_chunks_rev() {
11361136
}
11371137
}
11381138
let result = [2, 2, 2, 1, 1, 1, 0];
1139-
assert!(v == result);
1139+
assert_eq!(v, result);
11401140
}
11411141

11421142
#[test]

0 commit comments

Comments
 (0)