Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Oct 11, 2023
1 parent 6eab043 commit c8a5fe2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/transformers/js/core/src/constant_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ use swc_core::ecma::atoms::JsWord;
use swc_core::ecma::visit::Visit;

fn is_safe_literal(lit: &Lit) -> bool {
match lit {
Lit::Str(..) | Lit::Bool(..) | Lit::BigInt(..) | Lit::Null(..) | Lit::Num(..) => {
return true;
}
_ => {
return false;
}
}
matches!(
lit,
Lit::Str(..) | Lit::Bool(..) | Lit::BigInt(..) | Lit::Null(..) | Lit::Num(..)
)
}

pub struct ConstantModule {
Expand Down

0 comments on commit c8a5fe2

Please sign in to comment.