Skip to content

Commit 265cf37

Browse files
committed
Add another doctest showing equality for ConstantTimeGreaterThan.
1 parent 3565d78 commit 265cf37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,10 @@ pub trait ConstantTimeGreaterThan {
699699
/// let y_gt_x = y.ct_gt(&x);
700700
///
701701
/// assert_eq!(y_gt_x.unwrap_u8(), 1);
702+
///
703+
/// let x_gt_x = x.ct_gt(&x);
704+
///
705+
/// assert_eq!(x_gt_x.unwrap_u8(), 0);
702706
/// ```
703707
fn ct_gt(&self, other: &Self) -> Choice;
704708
}

0 commit comments

Comments
 (0)