@@ -136,12 +136,12 @@ pub enum IterKey {
136
136
137
137
/// Represent the key of a PHP iterator, which can be either a long or a string.
138
138
impl IterKey {
139
- /// Check if the key is numerical .
139
+ /// Check if the key is an integer .
140
140
///
141
141
/// # Returns
142
142
///
143
- /// Returns true if the key is numerical , false otherwise.
144
- pub fn is_numerical ( & self ) -> bool {
143
+ /// Returns true if the key is an integer , false otherwise.
144
+ pub fn is_long ( & self ) -> bool {
145
145
match self {
146
146
IterKey :: Long ( _) => true ,
147
147
IterKey :: String ( _) => false ,
@@ -289,14 +289,14 @@ mod tests {
289
289
290
290
let ( key, value) = iter. next ( ) . unwrap ( ) ;
291
291
292
- assert ! ( !key. is_numerical ( ) ) ;
292
+ assert ! ( !key. is_long ( ) ) ;
293
293
assert_eq ! ( key, IterKey :: String ( "key" . to_string( ) ) ) ;
294
294
assert ! ( value. is_string( ) ) ;
295
295
assert_eq ! ( value. string( ) . unwrap( ) , "foo" ) ;
296
296
297
297
let ( key, value) = iter. next ( ) . unwrap ( ) ;
298
298
299
- assert ! ( key. is_numerical ( ) ) ;
299
+ assert ! ( key. is_long ( ) ) ;
300
300
assert_eq ! ( key, IterKey :: Long ( 10 ) ) ;
301
301
assert ! ( value. is_string( ) ) ;
302
302
assert_eq ! ( value. string( ) . unwrap( ) , "bar" ) ;
0 commit comments