Skip to content

Commit 7ac29f8

Browse files
committed
use fx
1 parent 05e4d41 commit 7ac29f8

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • crates/swc_ecma_minifier/src/compress/optimize

crates/swc_ecma_minifier/src/compress/optimize/util.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::{
22
borrow::Borrow,
3-
collections::HashSet,
43
mem::{self, take},
54
ops::{Deref, DerefMut},
65
};
@@ -182,7 +181,7 @@ pub(crate) fn extract_class_side_effect<'a>(
182181

183182
let mut visitor = ClassEffectVisitor {
184183
found: false,
185-
private_ident: HashSet::new(),
184+
private_ident: FxHashSet::default(),
186185
};
187186

188187
for m in &mut c.body {
@@ -286,7 +285,7 @@ pub(crate) fn extract_class_side_effect<'a>(
286285

287286
struct ClassEffectVisitor {
288287
found: bool,
289-
private_ident: HashSet<Atom>,
288+
private_ident: FxHashSet<Atom>,
290289
}
291290

292291
impl Visit for ClassEffectVisitor {
@@ -346,7 +345,7 @@ impl Visit for ClassEffectVisitor {
346345
}
347346

348347
fn visit_class(&mut self, n: &Class) {
349-
let mut new_set = HashSet::new();
348+
let mut new_set = FxHashSet::default();
350349

351350
for m in &n.body {
352351
if let ClassMember::PrivateProp(PrivateProp { key, .. })

0 commit comments

Comments
 (0)