From 4fd40e6b46190f694777567d8ce8e2678462ca83 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Thu, 30 Jun 2022 04:19:54 -0400 Subject: [PATCH] clarify what went wrong in the .expect() --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 6b23047..63e4f18 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -834,6 +834,6 @@ impl ConstantTimeCmp for T { let combined_result: u8 = (is_eq + is_eq) + is_gt; *ORDERS .get(combined_result as usize) - .expect(".unwrap_u8() should never produce a value above 1") + .expect("incorrect implementations of ConstantTimeEq and ConstantTimeGreater returned both equal and greater for a comparison") } }