From 027067887928ddd7cc5c802332a3a22294feecd2 Mon Sep 17 00:00:00 2001 From: Scott Piriou <30843220+pscott@users.noreply.github.com> Date: Thu, 16 May 2024 18:17:41 +0200 Subject: [PATCH] add prediction type --- src/routes.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes.rs b/src/routes.rs index 0baf18d..75b1aeb 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -385,12 +385,13 @@ impl TryFrom for BoostEligibility { .parse() .map_err(|_| "failed to parse choice")?; if choice == 0 { - // A choice of `0` indicates that the winning choice should be bribed - Ok(BoostEligibility::BribeWinningOutcome) + // Error + Err("choice cannot be 0") } else { Ok(BoostEligibility::Bribe(choice)) } } + "prediction" => Ok(BoostEligibility::BribeWinningOutcome), _ => Err("invalid eligibility"), } }