Skip to content

Commit a7f76cf

Browse files
committed
oops, we should call it len
1 parent 9493267 commit a7f76cf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rust/ruby-prism/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ impl<'pr> NodeList<'pr> {
150150
}
151151
}
152152

153-
/// Returns the size of the list.
153+
/// Returns the length of the list.
154154
#[must_use]
155-
pub const fn size(&self) -> usize {
155+
pub const fn len(&self) -> usize {
156156
unsafe { self.pointer.as_ref().size }
157157
}
158158
}
@@ -801,7 +801,7 @@ mod tests {
801801
let result = parse(source.as_ref());
802802

803803
let node = result.node();
804-
assert_eq!(node.as_program_node().unwrap().statements().body().size(), 1);
804+
assert_eq!(node.as_program_node().unwrap().statements().body().len(), 1);
805805
let module = node.as_program_node().unwrap().statements().body().iter().next().unwrap();
806806
let module = module.as_module_node().unwrap();
807807
let locals = module.locals().iter().collect::<Vec<_>>();

0 commit comments

Comments
 (0)