Skip to content

Commit 6191fca

Browse files
alexle0nteLuni-4
authored andcommitted
Fix clippy lints
1 parent 3be85c5 commit 6191fca

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/node.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ impl<'a> Node<'a> {
8383
#[inline(always)]
8484
pub(crate) fn has_sibling(&self, id: u16) -> bool {
8585
self.0.parent().is_some_and(|parent| {
86-
let has_child = self
87-
.0
86+
self.0
8887
.children(&mut parent.walk())
89-
.any(|child| child.kind_id() == id);
90-
has_child
88+
.any(|child| child.kind_id() == id)
9189
})
9290
}
9391

@@ -101,11 +99,9 @@ impl<'a> Node<'a> {
10199

102100
#[inline(always)]
103101
pub(crate) fn is_child(&self, id: u16) -> bool {
104-
let is_child = self
105-
.0
102+
self.0
106103
.children(&mut self.0.walk())
107-
.any(|child| child.kind_id() == id);
108-
is_child
104+
.any(|child| child.kind_id() == id)
109105
}
110106

111107
pub(crate) fn child_count(&self) -> usize {

0 commit comments

Comments
 (0)