fix(rust)!: take u32 for index parameter to Node::{child, named_child}
Co-authored-by: Ye Sijun <junnplus@gmail.com>
This commit is contained in:
parent
7d0b94c008
commit
5e1daf0c41
3 changed files with 6 additions and 6 deletions
|
|
@ -1765,8 +1765,8 @@ impl<'tree> Node<'tree> {
|
|||
/// [`Node::children`] instead.
|
||||
#[doc(alias = "ts_node_child")]
|
||||
#[must_use]
|
||||
pub fn child(&self, i: usize) -> Option<Self> {
|
||||
Self::new(unsafe { ffi::ts_node_child(self.0, i as u32) })
|
||||
pub fn child(&self, i: u32) -> Option<Self> {
|
||||
Self::new(unsafe { ffi::ts_node_child(self.0, i) })
|
||||
}
|
||||
|
||||
/// Get this node's number of children.
|
||||
|
|
@ -1784,8 +1784,8 @@ impl<'tree> Node<'tree> {
|
|||
/// [`Node::named_children`] instead.
|
||||
#[doc(alias = "ts_node_named_child")]
|
||||
#[must_use]
|
||||
pub fn named_child(&self, i: usize) -> Option<Self> {
|
||||
Self::new(unsafe { ffi::ts_node_named_child(self.0, i as u32) })
|
||||
pub fn named_child(&self, i: u32) -> Option<Self> {
|
||||
Self::new(unsafe { ffi::ts_node_named_child(self.0, i) })
|
||||
}
|
||||
|
||||
/// Get this node's number of *named* children.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue