Skip to content

Commit

Permalink
refactor(ast)!: remove FromIn<Expression> for Statement
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jan 6, 2025
1 parent 2e7207f commit 3eb1cca
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions crates/oxc_ast/src/ast_impl/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 3eb1cca

Please sign in to comment.