Made the map seek target a publicly implementable interface
Integrated remove_range with the existing git code co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
ee3637216e
commit
6ef0f70528
4 changed files with 48 additions and 37 deletions
|
@ -5,7 +5,7 @@ use arrayvec::ArrayVec;
|
|||
pub use cursor::{Cursor, FilterCursor, Iter};
|
||||
use std::marker::PhantomData;
|
||||
use std::{cmp::Ordering, fmt, iter::FromIterator, sync::Arc};
|
||||
pub use tree_map::{TreeMap, TreeSet, PathDescendants};
|
||||
pub use tree_map::{MapSeekTarget, TreeMap, TreeSet};
|
||||
|
||||
#[cfg(test)]
|
||||
const TREE_BASE: usize = 2;
|
||||
|
@ -47,7 +47,7 @@ impl<'a, T: Summary> Dimension<'a, T> for T {
|
|||
}
|
||||
|
||||
pub trait SeekTarget<'a, S: Summary, D: Dimension<'a, S>>: fmt::Debug {
|
||||
fn cmp(&self, cursor_location: &D, cx: &S::Context) -> Ordering;
|
||||
fn cmp(&self, cursor_location: &D, cx: &S::Context) -> Ordering;
|
||||
}
|
||||
|
||||
impl<'a, S: Summary, D: Dimension<'a, S> + Ord> SeekTarget<'a, S, D> for D {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue