From 3eb1cca02fd6ee9c8690609c19af23fcb97802df Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 4 Jan 2025 18:39:52 +0000 Subject: [PATCH] refactor(ast)!: remove `FromIn for Statement` --- crates/oxc_ast/src/ast_impl/js.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/crates/oxc_ast/src/ast_impl/js.rs b/crates/oxc_ast/src/ast_impl/js.rs index 5b9414cca05a84..21e7ccb1c470ad 100644 --- a/crates/oxc_ast/src/ast_impl/js.rs +++ b/crates/oxc_ast/src/ast_impl/js.rs @@ -2,8 +2,8 @@ #![warn(missing_docs)] use std::{borrow::Cow, fmt}; -use oxc_allocator::{Box, FromIn, Vec}; -use oxc_span::{Atom, GetSpan, Span}; +use oxc_allocator::{Box, Vec}; +use oxc_span::{Atom, Span}; use oxc_syntax::{operator::UnaryOperator, scope::ScopeFlags, symbol::SymbolId}; use crate::ast::*; @@ -790,15 +790,6 @@ impl Statement<'_> { } } -impl<'a> FromIn<'a, Expression<'a>> for Statement<'a> { - fn from_in(expression: Expression<'a>, allocator: &'a oxc_allocator::Allocator) -> Self { - Statement::ExpressionStatement(Box::from_in( - ExpressionStatement { span: expression.span(), expression }, - allocator, - )) - } -} - impl Directive<'_> { /// A Use Strict Directive is an ExpressionStatement in a Directive Prologue whose StringLiteral is either of the exact code point sequences "use strict" or 'use strict'. /// A Use Strict Directive may not contain an EscapeSequence or LineContinuation.