From d910304eacb8daa1153109dd08e3c5fa74b1bbf0 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:30:47 +0000 Subject: [PATCH] refactor(semantic): rename lifetime on `impl IntoIterator for &AstNodes` (#5881) Follow on after #5873. Rename lifetime. I generally consider `'a` in AST types as short for `'ast`, so using `'ast` to mean something else is confusing. Rename lifetime to `'n` (short for `'nodes`). --- crates/oxc_semantic/src/node.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_semantic/src/node.rs b/crates/oxc_semantic/src/node.rs index 833a7a764..c24bba2fe 100644 --- a/crates/oxc_semantic/src/node.rs +++ b/crates/oxc_semantic/src/node.rs @@ -266,9 +266,9 @@ impl<'a> AstNodes<'a> { } } -impl<'ast, 'a> IntoIterator for &'ast AstNodes<'a> { - type Item = &'ast AstNode<'a>; - type IntoIter = std::slice::Iter<'ast, AstNode<'a>>; +impl<'a, 'n> IntoIterator for &'n AstNodes<'a> { + type Item = &'n AstNode<'a>; + type IntoIter = std::slice::Iter<'n, AstNode<'a>>; fn into_iter(self) -> Self::IntoIter { self.nodes.iter()