@@ -136,12 +136,12 @@ pub enum IterKey {
136136
137137/// Represent the key of a PHP iterator, which can be either a long or a string.
138138impl IterKey {
139- /// Check if the key is numerical .
139+ /// Check if the key is an integer .
140140 ///
141141 /// # Returns
142142 ///
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 {
145145 match self {
146146 IterKey :: Long ( _) => true ,
147147 IterKey :: String ( _) => false ,
@@ -289,14 +289,14 @@ mod tests {
289289
290290 let ( key, value) = iter. next ( ) . unwrap ( ) ;
291291
292- assert ! ( !key. is_numerical ( ) ) ;
292+ assert ! ( !key. is_long ( ) ) ;
293293 assert_eq ! ( key, IterKey :: String ( "key" . to_string( ) ) ) ;
294294 assert ! ( value. is_string( ) ) ;
295295 assert_eq ! ( value. string( ) . unwrap( ) , "foo" ) ;
296296
297297 let ( key, value) = iter. next ( ) . unwrap ( ) ;
298298
299- assert ! ( key. is_numerical ( ) ) ;
299+ assert ! ( key. is_long ( ) ) ;
300300 assert_eq ! ( key, IterKey :: Long ( 10 ) ) ;
301301 assert ! ( value. is_string( ) ) ;
302302 assert_eq ! ( value. string( ) . unwrap( ) , "bar" ) ;
0 commit comments