Skip to content

Commit fb2c997

Browse files
committed
fix silly bugs in binary_search_util test
1 parent 5d44beb commit fb2c997

File tree

1 file changed

+3
-2
lines changed
  • src/librustc_data_structures/binary_search_util

1 file changed

+3
-2
lines changed

src/librustc_data_structures/binary_search_util/test.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ type Element = (usize, &'static str);
44

55
fn test_map() -> Vec<Element> {
66
let mut data = vec![(3, "three-a"), (0, "zero"), (3, "three-b"), (22, "twenty-two")];
7-
data.sort_by_key(get_key)
7+
data.sort_by_key(get_key);
8+
data
89
}
910

1011
fn get_key(data: &Element) -> usize {
1112
data.0
1213
}
1314

1415
#[test]
15-
fn binary_search_slice() {
16+
fn binary_search_slice_test() {
1617
let map = test_map();
1718
assert_eq!(binary_search_slice(&map, get_key, &0), &[(0, "zero")]);
1819
assert_eq!(binary_search_slice(&map, get_key, &1), &[]);

0 commit comments

Comments
 (0)