From fb2c997d4eb34b616bb391442c2ab3b5a2f20e36 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 17 Jun 2019 16:23:07 -0400 Subject: [PATCH] fix silly bugs in binary_search_util test --- src/librustc_data_structures/binary_search_util/test.rs | 5 +++-- 1 file 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 { 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), &[]);