fix clippy

This commit is contained in:
qdequele
2020-10-13 10:01:57 +02:00
parent b406b6ee44
commit 704defea78
5 changed files with 17 additions and 14 deletions

View File

@ -293,12 +293,18 @@ impl<'a> SearchBuilder<'a> {
}
}
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub struct MatchPosition {
pub start: usize,
pub length: usize,
}
impl PartialOrd for MatchPosition {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
impl Ord for MatchPosition {
fn cmp(&self, other: &Self) -> Ordering {
match self.start.cmp(&other.start) {