We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_empty()
len() == 0
1 parent 9db4259 commit 7b5e1f5Copy full SHA for 7b5e1f5
crates/oxc_semantic/src/node.rs
@@ -87,7 +87,7 @@ impl<'a> AstNodes<'a> {
87
88
#[inline]
89
pub fn is_empty(&self) -> bool {
90
- self.nodes.len() == 0
+ self.nodes.is_empty()
91
}
92
93
/// Walk up the AST, iterating over each parent node.
crates/oxc_semantic/src/scope.rs
@@ -41,7 +41,7 @@ impl ScopeTree {
41
42
43
44
- self.len() == 0
+ self.parent_ids.is_empty()
45
46
47
pub fn ancestors(&self, scope_id: ScopeId) -> impl Iterator<Item = ScopeId> + '_ {
0 commit comments