Skip to content

Commit

Permalink
Add lexical-sort again after reverting it by mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloso committed Jun 22, 2020
1 parent 6c57992 commit 08ca26c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
23 changes: 16 additions & 7 deletions 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
Expand Up @@ -50,6 +50,6 @@ backtrace = "0.3"
serde = { version = "1.0", features = ["derive"] }
toml = "0.5"
rand = "0.7"
alphanumeric-sort = "1.0"
lexical-sort = "0.3"
trash = "1.0"
clap = { version = "2.33", default-features = false }
5 changes: 4 additions & 1 deletion src/image_cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,10 @@ impl ImageCache {
.collect();

dir_files.sort_unstable_by(|a, b| {
alphanumeric_sort::compare_os_str(&a.dir_entry.file_name(), &b.dir_entry.file_name())
lexical_sort::natural_lexical_cmp(
&a.dir_entry.file_name().to_string_lossy(),
&b.dir_entry.file_name().to_string_lossy(),
)
});

Ok(dir_files)
Expand Down

0 comments on commit 08ca26c

Please sign in to comment.