diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2019-06-17 16:23:07 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2019-07-02 12:25:22 -0400 |
| commit | fb2c997d4eb34b616bb391442c2ab3b5a2f20e36 (patch) | |
| tree | 7036e33f7b93f38f1f88004e884507d3110daa01 | |
| parent | 5d44bebb32b12687638a93cde551ee8919c305c1 (diff) | |
| download | rust-fb2c997d4eb34b616bb391442c2ab3b5a2f20e36.tar.gz rust-fb2c997d4eb34b616bb391442c2ab3b5a2f20e36.zip | |
fix silly bugs in binary_search_util test
| -rw-r--r-- | src/librustc_data_structures/binary_search_util/test.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_data_structures/binary_search_util/test.rs b/src/librustc_data_structures/binary_search_util/test.rs index a6361d91265..d74febb5c0f 100644 --- a/src/librustc_data_structures/binary_search_util/test.rs +++ b/src/librustc_data_structures/binary_search_util/test.rs @@ -4,7 +4,8 @@ type Element = (usize, &'static str); fn test_map() -> Vec<Element> { let mut data = vec![(3, "three-a"), (0, "zero"), (3, "three-b"), (22, "twenty-two")]; - data.sort_by_key(get_key) + data.sort_by_key(get_key); + data } fn get_key(data: &Element) -> usize { @@ -12,7 +13,7 @@ fn get_key(data: &Element) -> usize { } #[test] -fn binary_search_slice() { +fn binary_search_slice_test() { let map = test_map(); assert_eq!(binary_search_slice(&map, get_key, &0), &[(0, "zero")]); assert_eq!(binary_search_slice(&map, get_key, &1), &[]); |
