Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 23, 2021
1 parent b503673 commit 0636b7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ecmascript/minifier/src/option/terser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub enum TerserTopRetainOption {

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct TerserOptions {
pub struct TerserCompressorOptions {
#[serde(default)]
pub arguments: bool,

Expand Down Expand Up @@ -237,8 +237,8 @@ fn ecma_default() -> TerserEcmaVersion {
TerserEcmaVersion::Num(5)
}

impl From<TerserOptions> for CompressOptions {
fn from(c: TerserOptions) -> Self {
impl From<TerserCompressorOptions> for CompressOptions {
fn from(c: TerserCompressorOptions) -> Self {
CompressOptions {
arguments: c.arguments,
arrows: c.arrows.unwrap_or(c.defaults),
Expand Down
4 changes: 2 additions & 2 deletions ecmascript/minifier/tests/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use swc_common::SourceMap;
use swc_ecma_codegen::text_writer::JsWriter;
use swc_ecma_codegen::Emitter;
use swc_ecma_minifier::optimize;
use swc_ecma_minifier::option::terser::TerserOptions;
use swc_ecma_minifier::option::terser::TerserCompressorOptions;
use swc_ecma_minifier::option::CompressOptions;
use swc_ecma_minifier::option::MangleOptions;
use swc_ecma_minifier::option::MinifyOptions;
Expand Down Expand Up @@ -63,7 +63,7 @@ enum TestMangleOptions {
}

fn parse_compressor_config(s: &str) -> (bool, CompressOptions) {
let c: TerserOptions =
let c: TerserCompressorOptions =
serde_json::from_str(s).expect("failed to deserialize value into a compressor config");

(c.module, c.into())
Expand Down

0 comments on commit 0636b7c

Please sign in to comment.