Skip to content

Commit

Permalink
Fix: reversed score ranking
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNerma committed May 10, 2022
1 parent 4205049 commit 86fffa7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v0.3.3 (2022-05-10)

* **FIX:** Score ranking was reversed in `query` and `list`

## v0.3.2 (2022-05-10)

* **FIX:** `--top` flag for `inc` command being ignored if directory already registered
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jumpy"
version = "0.3.2"
version = "0.3.3"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Index {
.map(IndexEntry::from)
.collect::<Vec<_>>();

entries.sort();
entries.sort_by(|a, b| b.cmp(a));

if let Some(after) = after {
let index = entries.iter().position(|result| result.path == after);
Expand Down Expand Up @@ -133,7 +133,7 @@ impl Index {
pub fn list(&self) -> Vec<&str> {
let mut entries: Vec<_> = self.scored_entries.iter().map(IndexEntry::from).collect();

entries.sort();
entries.sort_by(|a, b| b.cmp(a));

entries.iter().map(|result| result.path).collect()
}
Expand Down

0 comments on commit 86fffa7

Please sign in to comment.