Skip to content

Commit 7614f3a

Browse files
committed
Rename
1 parent 678073a commit 7614f3a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/types/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ impl ZendHashTable {
464464
/// assert!(!ht.has_numerical_keys());
465465
/// ```
466466
pub fn has_numerical_keys(&self) -> bool {
467-
!self.iter().any(|(k, _)| !k.is_numerical())
467+
!self.iter().any(|(k, _)| !k.is_long())
468468
}
469469

470470
/// Checks if the hashtable has numerical, sequential keys.

src/types/iterator.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
138138
impl 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

Comments
 (0)