Skip to content

Commit

Permalink
Remove unnecessary lifetimes (#5769)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert authored Dec 20, 2024
1 parent dadd488 commit f116952
Show file tree
Hide file tree
Showing 97 changed files with 108 additions and 126 deletions.
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/array_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_array_expression(&mut self, array_literal: &ArrayLit) {
let end_position = self.add_type_and_start(
&TYPE_ARRAY_EXPRESSION,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/array_pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_array_pattern(&mut self, array_pattern: &ArrayPat) {
let end_position = self.add_type_and_start(
&TYPE_ARRAY_PATTERN,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/arrow_function_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::convert_ast::converter::ast_constants::{
use crate::convert_ast::converter::{convert_annotation, AstConverter};
use crate::store_arrow_function_expression_flags;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_arrow_function_expression(&mut self, arrow_expression: &ArrowExpr) {
let end_position = self.add_type_and_start(
&TYPE_ARROW_FUNCTION_EXPRESSION,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/assignment_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::convert_ast::converter::string_constants::{
use crate::convert_ast::converter::AstConverter;
use crate::store_assignment_expression;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_assignment_expression(&mut self, assignment_expression: &AssignExpr) {
store_assignment_expression!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/assignment_pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_assignment_pattern_and_get_left_position(
&mut self,
span: &Span,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/await_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::AwaitExpr;
use crate::convert_ast::converter::AstConverter;
use crate::store_await_expression;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_await_expression(&mut self, await_expression: &AwaitExpr) {
store_await_expression!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/binary_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::convert_ast::converter::string_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_binary_expression(&mut self, binary_expression: &BinExpr) {
let end_position = self.add_type_and_start(
match binary_expression.op {
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/block_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_block_statement(
&mut self,
block_statement: &BlockStmt,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/break_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::BreakStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_break_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_break_statement(&mut self, break_statement: &BreakStmt) {
store_break_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/call_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::convert_ast::converter::ast_constants::{
use crate::convert_ast::converter::{convert_annotation, AstConverter};
use crate::store_call_expression_flags;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_call_expression(
&mut self,
span: &Span,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/catch_clause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_catch_clause(&mut self, catch_clause: &CatchClause) {
let end_position = self.add_type_and_start(
&TYPE_CATCH_CLAUSE,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/chain_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_chain_expression(
&mut self,
optional_chain_expression: &OptChainExpr,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/class_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_class_body(&mut self, class_members: &[ClassMember], start: u32, end: u32) {
let end_position =
self.add_type_and_explicit_start(&TYPE_CLASS_BODY, start, CLASS_BODY_RESERVED_BYTES);
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/class_declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ClassDecl;
use crate::convert_ast::converter::ast_constants::TYPE_CLASS_DECLARATION;
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_class_declaration(&mut self, class_declaration: &ClassDecl) {
self.store_class_node(
&TYPE_CLASS_DECLARATION,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/class_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use swc_ecma_ast::ClassExpr;

use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_class_expression(
&mut self,
class_expression: &ClassExpr,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/conditional_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::CondExpr;
use crate::convert_ast::converter::AstConverter;
use crate::store_conditional_expression;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_conditional_expression(&mut self, conditional_expression: &CondExpr) {
store_conditional_expression!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/continue_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ContinueStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_continue_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_continue_statement(&mut self, continue_statement: &ContinueStmt) {
store_continue_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/debugger_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::DebuggerStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_debugger_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_debugger_statement(&mut self, debugger_statement: &DebuggerStmt) {
store_debugger_statement!(self, span => debugger_statement.span);
}
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/decorator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::Decorator;
use crate::convert_ast::converter::AstConverter;
use crate::store_decorator;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_decorator(&mut self, decorator: &Decorator) {
store_decorator!(self, span => decorator.span, expression=>[decorator.expr, convert_expression]);
}
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/directive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use swc_ecma_ast::ExprStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_directive;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_directive(&mut self, expression_statement: &ExprStmt, directive: &JsWord) {
store_directive!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/do_while_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::DoWhileStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_do_while_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_do_while_statement(&mut self, do_while_statement: &DoWhileStmt) {
store_do_while_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/empty_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::EmptyStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_empty_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_empty_statement(&mut self, empty_statement: &EmptyStmt) {
store_empty_statement!(self, span => empty_statement.span);
}
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/export_all_declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_export_all_declaration(
&mut self,
span: &Span,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/export_default_declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_export_default_declaration(
&mut self,
span: &Span,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/export_named_declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_export_named_declaration(
&mut self,
span: &Span,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/export_specifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ExportNamedSpecifier;
use crate::convert_ast::converter::AstConverter;
use crate::store_export_specifier;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_export_specifier(&mut self, export_named_specifier: &ExportNamedSpecifier) {
store_export_specifier!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/expression_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ExprStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_expression_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_expression_statement(&mut self, expression_statement: &ExprStmt) {
store_expression_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/for_in_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ForInStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_for_in_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_for_in_statement(&mut self, for_in_statement: &ForInStmt) {
store_for_in_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/for_of_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ForOfStmt;
use crate::convert_ast::converter::AstConverter;
use crate::{store_for_of_statement, store_for_of_statement_flags};

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_for_of_statement(&mut self, for_of_statement: &ForOfStmt) {
store_for_of_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/for_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ForStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_for_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_for_statement(&mut self, for_statement: &ForStmt) {
store_for_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/function_declaration.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
// included in shared/function_node.rs
}
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/function_expression.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
// included in shared/function_node.rs
}
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_identifier(&mut self, start: u32, end: u32, name: &str) {
let end_position =
self.add_type_and_explicit_start(&TYPE_IDENTIFIER, start, IDENTIFIER_RESERVED_BYTES);
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/if_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::IfStmt;
use crate::convert_ast::converter::AstConverter;
use crate::store_if_statement;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_if_statement(&mut self, if_statement: &IfStmt) {
store_if_statement!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/import_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_import_attribute(&mut self, key_value_property: &KeyValueProp) {
// type
let end_position = self.add_type_and_start(
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/import_declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_import_declaration(&mut self, import_declaration: &ImportDecl) {
let end_position = self.add_type_and_start(
&TYPE_IMPORT_DECLARATION,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/import_default_specifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ImportDefaultSpecifier;
use crate::convert_ast::converter::AstConverter;
use crate::store_import_default_specifier;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_import_default_specifier(
&mut self,
import_default_specifier: &ImportDefaultSpecifier,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/import_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::convert_ast::converter::ast_constants::{
};
use crate::convert_ast::converter::AstConverter;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_import_expression(&mut self, span: &Span, arguments: &[ExprOrSpread]) {
let end_position = self.add_type_and_start(
&TYPE_IMPORT_EXPRESSION,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/import_namespace_specifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ImportStarAsSpecifier;
use crate::convert_ast::converter::AstConverter;
use crate::store_import_namespace_specifier;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_import_namespace_specifier(
&mut self,
import_namespace_specifier: &ImportStarAsSpecifier,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/import_specifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::ImportNamedSpecifier;
use crate::convert_ast::converter::AstConverter;
use crate::store_import_specifier;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_import_specifier(&mut self, import_named_specifier: &ImportNamedSpecifier) {
store_import_specifier!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/jsx_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::JSXAttr;
use crate::convert_ast::converter::AstConverter;
use crate::store_jsx_attribute;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_jsx_attribute(&mut self, jsx_attribute: &JSXAttr) {
store_jsx_attribute!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/jsx_closing_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::JSXClosingElement;
use crate::convert_ast::converter::AstConverter;
use crate::store_jsx_closing_element;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_jsx_closing_element(&mut self, jsx_closing_element: &JSXClosingElement) {
store_jsx_closing_element!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/jsx_closing_fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::JSXClosingFragment;
use crate::convert_ast::converter::AstConverter;
use crate::store_jsx_closing_fragment;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_jsx_closing_fragment(&mut self, jsx_closing_fragment: &JSXClosingFragment) {
store_jsx_closing_fragment!(
self,
Expand Down
2 changes: 1 addition & 1 deletion rust/parse_ast/src/ast_nodes/jsx_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use swc_ecma_ast::JSXElement;
use crate::convert_ast::converter::AstConverter;
use crate::store_jsx_element;

impl<'a> AstConverter<'a> {
impl AstConverter<'_> {
pub(crate) fn store_jsx_element(&mut self, jsx_element: &JSXElement) {
store_jsx_element!(
self,
Expand Down
Loading

0 comments on commit f116952

Please sign in to comment.