Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
aschey committed Mar 12, 2024
1 parent 94fb019 commit e377de4
Show file tree
Hide file tree
Showing 11 changed files with 2,435 additions and 1,456 deletions.
3,586 changes: 2,249 additions & 1,337 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions libplatune/management/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ directories = "5"
eyre = "0.6"
futures = "0.3"
ignore = "0.4"
itertools = "0.11"
itertools = "0.12"
lazy_static = "1"
lofty = { git = "https://github.com/aschey/lofty-rs", rev = "48aac90bb18b626c61bbeed29eeb4bc5be1d4871" }
log = "0.4"
Expand All @@ -38,10 +38,10 @@ sqlx = { version = "0.7", default-features = false, features = [
"macros",
"runtime-tokio",
] }
daemon-slayer = { git = "https://github.com/aschey/daemon-slayer", rev = "5dbe48857cff5c6304557318ee406366e3216d18", features = [
daemon-slayer = { git = "https://github.com/aschey/daemon-slayer", rev = "23659b534dbb46eb4d9b7d251037a9a67a6ce50e", features = [
"native-notification",
] }
strum = { version = "0.25", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }
tap = "1"
thiserror = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
Expand All @@ -52,8 +52,8 @@ walkdir = "2"

[dev-dependencies]
criterion = { version = "0.5.1", features = ["async_tokio"] }
ctor = "0.2.4"
ctor = "0.2.7"
pretty_assertions = "1.4.0"
rstest = "0.18.2"
tempfile = "3.8.0"
tracing-subscriber = "0.3.17"
tempfile = "3.10.1"
tracing-subscriber = "0.3.18"
25 changes: 18 additions & 7 deletions libplatune/management/src/search/result_score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,31 @@ impl PartialEq for ResultScore {
}
}

impl PartialOrd for ResultScore {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
impl Eq for ResultScore {}

impl Ord for ResultScore {
fn cmp(&self, other: &Self) -> Ordering {
let weighted_ord = self.weighted_score.partial_cmp(&other.weighted_score);
if weighted_ord != Some(Ordering::Equal) && weighted_ord.is_some() {
return weighted_ord;
if let Some(weighted_ord) = weighted_ord {
if weighted_ord != Ordering::Equal {
return weighted_ord;
}
}

let len_ord = self.match_len_score.cmp(&other.match_len_score);
if len_ord != Ordering::Equal {
return Some(len_ord);
return len_ord;
}
let full_len_ord = self.full_len_score.cmp(&other.full_len_score);
if full_len_ord != Ordering::Equal {
return Some(full_len_ord);
return full_len_ord;
}
self.full_entry.partial_cmp(&other.full_entry)
self.full_entry.cmp(&other.full_entry)
}
}

impl PartialOrd for ResultScore {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
10 changes: 5 additions & 5 deletions libplatune/management/src/search/search_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ impl SearchEntry {

impl Ord for SearchEntry {
fn cmp(&self, other: &Self) -> Ordering {
self.partial_cmp(other).unwrap()
let self_score = self.score_match();
let other_score = other.score_match();

self_score.cmp(&other_score)
}
}

impl PartialOrd for SearchEntry {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
let self_score = self.score_match();
let other_score = other.score_match();

self_score.partial_cmp(&other_score)
Some(self.cmp(other))
}
}

Expand Down
16 changes: 8 additions & 8 deletions libplatune/player/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ derivative = "2"
eyre = "0.6"
flume = "0.11"
futures-util = "0.3"
stream-download = { version = "0.3.0", features = ["reqwest-rustls"] }
strum = { version = "0.25", features = ["derive"] }
stream-download = { version = "0.4.2", features = ["reqwest-rustls"] }
strum = { version = "0.26", features = ["derive"] }
tap = "1"
thiserror = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
Expand All @@ -25,11 +25,11 @@ decal = { git = "https://github.com/aschey/decal", rev = "49c26561f7ea9a4f783e1d

[dev-dependencies]
assert_matches = "1.5.0"
async-trait = "0.1.73"
ctor = "0.2.4"
futures = "0.3.28"
async-trait = "0.1.77"
ctor = "0.2.7"
futures = "0.3.30"
pretty_assertions = "1.4.0"
rstest = "0.18.2"
spin_sleep = "1.1.1"
tracing-appender = "0.2.2"
tracing-subscriber = "0.3.17"
spin_sleep = "1.2.0"
tracing-appender = "0.2.3"
tracing-subscriber = "0.3.18"
Loading

0 comments on commit e377de4

Please sign in to comment.