diff options
Diffstat (limited to 'crates/stdx/src')
-rw-r--r-- | crates/stdx/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index 5aacdb16e..13aab1451 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs | |||
@@ -152,13 +152,13 @@ where | |||
152 | left | 152 | left |
153 | } | 153 | } |
154 | 154 | ||
155 | pub fn equal_range_by<T, F>(slice: &[T], mut key: F) -> (usize, usize) | 155 | pub fn equal_range_by<T, F>(slice: &[T], mut key: F) -> ops::Range<usize> |
156 | where | 156 | where |
157 | F: FnMut(&T) -> Ordering, | 157 | F: FnMut(&T) -> Ordering, |
158 | { | 158 | { |
159 | let start = partition_point(slice, |it| key(it) == Ordering::Less); | 159 | let start = partition_point(slice, |it| key(it) == Ordering::Less); |
160 | let len = partition_point(&slice[start..], |it| key(it) == Ordering::Equal); | 160 | let len = partition_point(&slice[start..], |it| key(it) == Ordering::Equal); |
161 | (start, len) | 161 | start..start + len |
162 | } | 162 | } |
163 | 163 | ||
164 | pub struct JodChild(pub process::Child); | 164 | pub struct JodChild(pub process::Child); |