Skip to content

Commit

Permalink
actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfran committed Jan 25, 2024
1 parent f2e48bc commit 9b97327
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Fmt
run: cargo fmt --check
run: cargo fmt --verbose
- name: Clippy
run: cargo clippy --verbose
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
7 changes: 5 additions & 2 deletions search/src/query/document_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ impl Eq for Entry {}

impl PartialOrd for Entry {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
other.score.partial_cmp(&self.score)
Some(self.cmp(other))
}
}

impl Ord for Entry {
fn cmp(&self, other: &Self) -> Ordering {
other.partial_cmp(self).unwrap()
other
.score
.partial_cmp(&self.score)
.unwrap_or(Ordering::Equal)
}
}

Expand Down

0 comments on commit 9b97327

Please sign in to comment.