@@ -48,10 +48,10 @@ pub trait Logarithm: Sized {
48
48
49
49
/// Returns the integer logarithm base `base` of `self`, or `None` if it is
50
50
/// not possible to take the log base `base` of `self`.
51
- fn checked_ilog ( self , base : Self ) -> Option < Self > ;
51
+ fn checked_log ( self , base : Self ) -> Option < Self > ;
52
52
53
53
/// Returns the integer logarithm base `base` of `self`.
54
- fn ilog ( self , base : Self ) -> Self ;
54
+ fn log ( self , base : Self ) -> Self ;
55
55
}
56
56
57
57
impl Logarithm for usize {
@@ -72,15 +72,15 @@ impl Logarithm for usize {
72
72
#[ inline( always) ]
73
73
#[ must_use = "this returns the result of the operation, \
74
74
without modifying the original"]
75
- fn checked_ilog ( self , base : usize ) -> Option < Self > {
75
+ fn checked_log ( self , base : usize ) -> Option < Self > {
76
76
usize_const_checked_log ( self , base)
77
77
}
78
78
79
79
#[ inline( always) ]
80
80
#[ must_use = "this returns the result of the operation, \
81
81
without modifying the original"]
82
- fn ilog ( self , base : usize ) -> Self {
83
- match self . checked_ilog ( base) {
82
+ fn log ( self , base : usize ) -> Self {
83
+ match self . checked_log ( base) {
84
84
Some ( log) => log,
85
85
None => panic ! ( "cannot take log base {} of {}" , base, self ) ,
86
86
}
0 commit comments