Skip to content

Commit bd1145f

Browse files
authored
Discard changes to crates/ruff_index/src/slice.rs
1 parent 5e2cd37 commit bd1145f

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

crates/ruff_index/src/slice.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::vec::IndexVec;
22
use crate::Idx;
3-
use std::cmp::Ordering;
43
use std::fmt::{Debug, Formatter};
54
use std::marker::PhantomData;
65
use std::ops::{Index, IndexMut, Range};
@@ -118,29 +117,6 @@ impl<I: Idx, T> IndexSlice<I, T> {
118117
Err(i) => Err(Idx::new(i)),
119118
}
120119
}
121-
122-
#[inline]
123-
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<I, I>
124-
where
125-
F: FnMut(&'a T) -> Ordering,
126-
{
127-
match self.raw.binary_search_by(f) {
128-
Ok(i) => Ok(Idx::new(i)),
129-
Err(i) => Err(Idx::new(i)),
130-
}
131-
}
132-
133-
#[inline]
134-
pub fn binary_search_by_key<'a, B, F>(&'a self, key: &B, f: F) -> Result<I, I>
135-
where
136-
F: FnMut(&'a T) -> B,
137-
B: Ord,
138-
{
139-
match self.raw.binary_search_by_key(key, f) {
140-
Ok(i) => Ok(Idx::new(i)),
141-
Err(i) => Err(Idx::new(i)),
142-
}
143-
}
144120
}
145121

146122
impl<I, T> Debug for IndexSlice<I, T>

0 commit comments

Comments
 (0)