File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -407,8 +407,8 @@ pub trait DoubleEndedSearcher<H: Haystack>: ReverseSearcher<H> {}
407407// equivalent to SearchPtrs in "Pattern API 1.5"
408408// and PatternHaystack in "Pattern API 2.0"
409409pub trait Haystack: Sized {
410- type StartCursor: Copy;
411- type EndCursor: Copy;
410+ type StartCursor: Copy + PartialOrd<Self::EndCursor> ;
411+ type EndCursor: Copy + PartialOrd<Self::StartCursor> ;
412412
413413 // The following 5 methods are same as those in "Pattern API 1.5"
414414 // except the cursor type is split into two.
@@ -418,9 +418,6 @@ pub trait Haystack: Sized {
418418 unsafe fn end_cursor_to_offset(hs: &Self, cur: Self::EndCursor) -> usize;
419419 unsafe fn range_to_self(hs: Self, start: Self::StartCursor, end: Self::EndCursor) -> Self;
420420
421- // Since a StartCursor and EndCursor may not be comparable, we also need this method
422- fn is_range_empty(start: Self::StartCursor, end: Self::EndCursor) -> bool;
423-
424421 // And then we want to swap between the two cursor types
425422 unsafe fn start_to_end_cursor(hs: &Self, cur: Self::StartCursor) -> Self::EndCursor;
426423 unsafe fn end_to_start_cursor(hs: &Self, cur: Self::EndCursor) -> Self::StartCursor;
You can’t perform that action at this time.
0 commit comments