Clippy cleanup under green tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 12:03:26 +01:00
co-authored by Claude Opus 5.5
parent 12b1efbe1a
commit 7dafbbb993
9 changed files with 17 additions and 17 deletions
+5 -3
View File
@@ -15,6 +15,9 @@ use crate::preflop::advise::advise;
use crate::preflop::hand_percentile::percentile;
use crate::rng::Rng;
/// A villain's range as an owned predicate over hole cards.
type HandFilter = Box<dyn Fn(&[Card]) -> bool>;
const TRIALS_TWO_CARD: u32 = 3000;
const TRIALS_FIVE_CARD: u32 = 1500;
@@ -35,11 +38,10 @@ fn postflop(spot: &Spot, thresholds: &Thresholds) -> Decision {
);
}
let variant = spot.variant;
let filters: Vec<Box<dyn Fn(&[Card]) -> bool>> = fractions
let filters: Vec<HandFilter> = fractions
.into_iter()
.map(|fraction| {
Box::new(move |hand: &[Card]| percentile(variant, hand) <= fraction)
as Box<dyn Fn(&[Card]) -> bool>
Box::new(move |hand: &[Card]| percentile(variant, hand) <= fraction) as HandFilter
})
.collect();
let ranges: Vec<VillainRange> =
+1 -3
View File
@@ -31,9 +31,7 @@ pub fn scored(spot: &Spot, estimate: &Estimate, thresholds: &Thresholds) -> Vec<
.then(|| Scored { choice: Choice::Call, ev: ev::call(share, spot.pot, spot.to_call) });
let fold = (spot.is_legal(ActionKind::Fold) && !free)
.then(|| Scored { choice: Choice::Fold, ev: ev::fold() });
let raises = (spot.is_legal(ActionKind::Raise) && share >= thresholds.value_raise)
.then(|| candidates(spot))
.unwrap_or_default()
let raises = if spot.is_legal(ActionKind::Raise) && share >= thresholds.value_raise { candidates(spot) } else { Default::default() }
.into_iter()
.map(|to| {
let fe = fold_equity(spot.pot, to, thresholds.fold_equity_scale, live);