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:
Will Lillis 2025-08-02 17:58:40 -04:00
parent 7d0b94c008
commit 5e1daf0c41
3 changed files with 6 additions and 6 deletions

View file

@ -572,7 +572,7 @@ pub fn parse_file_at_path(
write!(&mut stdout, "</{}>", tag.expect("there is a tag"))?;
// we only write a line in the case where it's the last sibling
if let Some(parent) = node.parent() {
if parent.child(parent.child_count() - 1).unwrap() == node {
if parent.child(parent.child_count() as u32 - 1).unwrap() == node {
stdout.write_all(b"\n")?;
}
}