@@ -670,7 +670,7 @@ impl<T: ConstantTimeEq> ConstantTimeEq for CtOption<T> {
670
670
671
671
/// A type which can be compared in some manner and be determined to be greater
672
672
/// than another of the same type.
673
- pub trait ConstantTimeGreaterThan {
673
+ pub trait ConstantTimeGreater {
674
674
/// Determine whether `self > other`.
675
675
///
676
676
/// The bitwise-NOT of the return value of this function should be usable to
@@ -687,7 +687,7 @@ pub trait ConstantTimeGreaterThan {
687
687
///
688
688
/// ```
689
689
/// # extern crate subtle;
690
- /// use subtle::ConstantTimeGreaterThan ;
690
+ /// use subtle::ConstantTimeGreater ;
691
691
///
692
692
/// let x: u8 = 13;
693
693
/// let y: u8 = 42;
@@ -707,9 +707,9 @@ pub trait ConstantTimeGreaterThan {
707
707
fn ct_gt ( & self , other : & Self ) -> Choice ;
708
708
}
709
709
710
- macro_rules! generate_unsigned_integer_greater_than {
710
+ macro_rules! generate_unsigned_integer_greater {
711
711
( $t_u: ty, $bit_width: expr) => {
712
- impl ConstantTimeGreaterThan for $t_u {
712
+ impl ConstantTimeGreater for $t_u {
713
713
/// Returns Choice::from(1) iff x > y, and Choice::from(0) iff x <= y.
714
714
///
715
715
/// # Note
@@ -742,16 +742,16 @@ macro_rules! generate_unsigned_integer_greater_than {
742
742
}
743
743
}
744
744
745
- generate_unsigned_integer_greater_than ! ( u8 , 8 ) ;
746
- generate_unsigned_integer_greater_than ! ( u16 , 16 ) ;
747
- generate_unsigned_integer_greater_than ! ( u32 , 32 ) ;
748
- generate_unsigned_integer_greater_than ! ( u64 , 64 ) ;
745
+ generate_unsigned_integer_greater ! ( u8 , 8 ) ;
746
+ generate_unsigned_integer_greater ! ( u16 , 16 ) ;
747
+ generate_unsigned_integer_greater ! ( u32 , 32 ) ;
748
+ generate_unsigned_integer_greater ! ( u64 , 64 ) ;
749
749
#[ cfg( feature = "i128" ) ]
750
- generate_unsigned_integer_greater_than ! ( u128 , 128 ) ;
750
+ generate_unsigned_integer_greater ! ( u128 , 128 ) ;
751
751
752
752
/// A type which can be compared in some manner and be determined to be less
753
753
/// than another of the same type.
754
- pub trait ConstantTimeLessThan : ConstantTimeEq + ConstantTimeGreaterThan {
754
+ pub trait ConstantTimeLess : ConstantTimeEq + ConstantTimeGreater {
755
755
/// Determine whether `self < other`.
756
756
///
757
757
/// The bitwise-NOT of the return value of this function should be usable to
@@ -771,7 +771,7 @@ pub trait ConstantTimeLessThan: ConstantTimeEq + ConstantTimeGreaterThan {
771
771
///
772
772
/// ```
773
773
/// # extern crate subtle;
774
- /// use subtle::ConstantTimeLessThan ;
774
+ /// use subtle::ConstantTimeLess ;
775
775
///
776
776
/// let x: u8 = 13;
777
777
/// let y: u8 = 42;
@@ -794,9 +794,9 @@ pub trait ConstantTimeLessThan: ConstantTimeEq + ConstantTimeGreaterThan {
794
794
}
795
795
}
796
796
797
- impl ConstantTimeLessThan for u8 { }
798
- impl ConstantTimeLessThan for u16 { }
799
- impl ConstantTimeLessThan for u32 { }
800
- impl ConstantTimeLessThan for u64 { }
797
+ impl ConstantTimeLess for u8 { }
798
+ impl ConstantTimeLess for u16 { }
799
+ impl ConstantTimeLess for u32 { }
800
+ impl ConstantTimeLess for u64 { }
801
801
#[ cfg( feature = "i128" ) ]
802
- impl ConstantTimeLessThan for u128 { }
802
+ impl ConstantTimeLess for u128 { }
0 commit comments