Skip to content

Commit

Permalink
clarify what went wrong in the .expect()
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jun 30, 2022
1 parent 39b583a commit 4fd40e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,6 @@ impl<T: ConstantTimeEq + ConstantTimeGreater> 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")
}
}

0 comments on commit 4fd40e6

Please sign in to comment.