Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Version Sort #843

Merged
merged 8 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ yaml-rust = "0.4.*"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8"
url = "2.1.*"
regex = "1.7.3"

[target.'cfg(unix)'.dependencies]
users = "0.11.*"
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ mod icon;
mod meta;
mod sort;
mod theme;
mod versionsort;

use clap::Parser;

Expand Down
2 changes: 1 addition & 1 deletion src/sort.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::flags::{DirGrouping, Flags, SortColumn, SortOrder};
use crate::meta::Meta;
use human_sort::compare;
use crate::versionsort::compare;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you didn't meant to simply remove human-sort, but this is what you are doing here.

Did you forget to implement some cli / config switch ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do mean to replace the sorting library. The new code is now its own separate crate and the PR now reflects that.

use std::cmp::Ordering;

pub type SortFn = fn(&Meta, &Meta) -> Ordering;
Expand Down
Loading