Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Feb 19, 2025
1 parent 394d112 commit 890d7c0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 21 deletions.
68 changes: 49 additions & 19 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 candidate-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
arrayvec = "0.7.4"
ordered-float = { version = "4.2.0", default-features = false }
ordered-float = { version = "5.0.0", default-features = false }

[dev-dependencies]
proptest = "1.4.0"
4 changes: 3 additions & 1 deletion candidate-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ where
.iter()
.filter(|c| selected.iter().all(|s| s.id() != c.id()))
.map(|c| (c, marginal_score(current_score, &selected, c)))
.max_by_key(|(c, marginal_score)| marginal_score / c.fee().as_f64().max(0.01))
.max_by_key(|(c, marginal_score)| {
marginal_score / NotNan::new(c.fee().as_f64().max(0.01)).unwrap()
})
.filter(|(_, marginal_score)| *marginal_score.as_ref() > 0.0);
match selection {
Some((selection, _)) => {
Expand Down

0 comments on commit 890d7c0

Please sign in to comment.