Skip to content

Commit

Permalink
update alphanumeric-sort dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
xvxx committed Nov 28, 2022
1 parent ae866b4 commit 6761e1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 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 @@ -29,5 +29,5 @@ dev-version-ext = "dev"
[dependencies]
content_inspector = "0.2.4"
threadpool = "1.7.1"
alphanumeric-sort = "1.0.11"
alphanumeric-sort = "1.4"
shell-escape = "0.1.4"
5 changes: 4 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ fn sort_paths(dir_path: &str, reverse: bool) -> Result<Vec<DirEntry>> {
let a_is_dir = is_dir(a);
let b_is_dir = is_dir(b);
if a_is_dir && b_is_dir || !a_is_dir && !b_is_dir {
let ord = alphanumeric_sort::compare_os_str(a.path().as_ref(), b.path().as_ref());
let ord = alphanumeric_sort::compare_os_str::<&Path, &Path>(
a.path().as_ref(),
b.path().as_ref(),
);
if reverse {
ord.reverse()
} else {
Expand Down

0 comments on commit 6761e1d

Please sign in to comment.