From f6a83e4dc61b691cb791ddff44fcc6502d3c388f Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Fri, 8 May 2026 14:37:13 +0200 Subject: [PATCH] refactor: make BuiltinFactor::log_evidence match exhaustive Replace the `_ => 0.0` wildcard with explicit `Self::TeamSum(_) | Self::RankDiff(_) => 0.0`. No behavioral change; future variants now produce a compile error instead of being silently absorbed by the wildcard. --- src/factor/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/factor/mod.rs b/src/factor/mod.rs index 4d6788d..85e9060 100644 --- a/src/factor/mod.rs +++ b/src/factor/mod.rs @@ -95,7 +95,7 @@ impl Factor for BuiltinFactor { match self { Self::Trunc(f) => f.log_evidence(vars), Self::Margin(f) => f.log_evidence(vars), - _ => 0.0, + Self::TeamSum(_) | Self::RankDiff(_) => 0.0, } } }