@@ -410,7 +410,7 @@ impl<'a> Fold for Hoist<'a> {
410
410
if let Expr :: Member ( member) = & * * init {
411
411
// Match var x = require('foo').bar;
412
412
if let Some ( source) =
413
- match_require ( & * member. obj , & self . collect . decls , self . collect . ignore_mark )
413
+ match_require ( & member. obj , & self . collect . decls , self . collect . ignore_mark )
414
414
{
415
415
if !self . collect . non_static_requires . contains ( & source) {
416
416
// If this is not the first declarator in the variable declaration, we need to
@@ -742,7 +742,7 @@ impl<'a> Fold for Hoist<'a> {
742
742
. enumerate ( )
743
743
. map ( |( i, expr) | {
744
744
if i != len - 1
745
- && match_require ( & * expr, & self . collect . decls , self . collect . ignore_mark ) . is_some ( )
745
+ && match_require ( & expr, & self . collect . decls , self . collect . ignore_mark ) . is_some ( )
746
746
{
747
747
return Box :: new ( Expr :: Unary ( UnaryExpr {
748
748
op : UnaryOp :: Bang ,
@@ -1346,7 +1346,7 @@ impl Visit for Collect {
1346
1346
}
1347
1347
Stmt :: Expr ( expr) => {
1348
1348
// Top-level require(). Do not traverse further so it is not marked as wrapped.
1349
- if let Some ( _source) = self . match_require ( & * expr. expr ) {
1349
+ if let Some ( _source) = self . match_require ( & expr. expr ) {
1350
1350
return ;
1351
1351
}
1352
1352
@@ -1844,7 +1844,7 @@ impl Visit for Collect {
1844
1844
1845
1845
match & * * init {
1846
1846
Expr :: Member ( member) => {
1847
- if let Some ( source) = self . match_require ( & * member. obj ) {
1847
+ if let Some ( source) = self . match_require ( & member. obj ) {
1848
1848
// Convert member expression on require to a destructuring assignment.
1849
1849
// const yx = require('y').x; -> const {x: yx} = require('x');
1850
1850
let key = match & member. prop {
@@ -1875,7 +1875,7 @@ impl Visit for Collect {
1875
1875
Expr :: Await ( await_exp) => {
1876
1876
// let x = await import('foo');
1877
1877
// let {x} = await import('foo');
1878
- if let Some ( source) = match_import ( & * await_exp. arg , self . ignore_mark ) {
1878
+ if let Some ( source) = match_import ( & await_exp. arg , self . ignore_mark ) {
1879
1879
self . add_pat_imports ( & node. name , & source, ImportKind :: DynamicImport ) ;
1880
1880
return ;
1881
1881
}
@@ -1903,7 +1903,7 @@ impl Visit for Collect {
1903
1903
}
1904
1904
Expr :: Member ( member) => {
1905
1905
// import('foo').then(foo => ...);
1906
- if let Some ( source) = match_import ( & * member. obj , self . ignore_mark ) {
1906
+ if let Some ( source) = match_import ( & member. obj , self . ignore_mark ) {
1907
1907
if match_property_name ( member) . map_or ( false , |f| & * f. 0 == "then" ) {
1908
1908
if let Some ( ExprOrSpread { expr, .. } ) = node. args . get ( 0 ) {
1909
1909
let param = match & * * expr {
@@ -2078,15 +2078,15 @@ impl Collect {
2078
2078
for prop in & object. props {
2079
2079
match prop {
2080
2080
ObjectPatProp :: KeyValue ( kv) => {
2081
- self . get_non_const_binding_idents ( & * kv. value , idents) ;
2081
+ self . get_non_const_binding_idents ( & kv. value , idents) ;
2082
2082
}
2083
2083
ObjectPatProp :: Assign ( assign) => {
2084
2084
if self . non_const_bindings . contains_key ( & id ! ( assign. key) ) {
2085
2085
idents. push ( assign. key . clone ( ) ) ;
2086
2086
}
2087
2087
}
2088
2088
ObjectPatProp :: Rest ( rest) => {
2089
- self . get_non_const_binding_idents ( & * rest. arg , idents) ;
2089
+ self . get_non_const_binding_idents ( & rest. arg , idents) ;
2090
2090
}
2091
2091
}
2092
2092
}
@@ -2121,7 +2121,7 @@ fn has_binding_identifier(node: &Pat, sym: &JsWord, decls: &HashSet<Id>) -> bool
2121
2121
for prop in & object. props {
2122
2122
match prop {
2123
2123
ObjectPatProp :: KeyValue ( kv) => {
2124
- if has_binding_identifier ( & * kv. value , sym, decls) {
2124
+ if has_binding_identifier ( & kv. value , sym, decls) {
2125
2125
return true ;
2126
2126
}
2127
2127
}
@@ -2131,7 +2131,7 @@ fn has_binding_identifier(node: &Pat, sym: &JsWord, decls: &HashSet<Id>) -> bool
2131
2131
}
2132
2132
}
2133
2133
ObjectPatProp :: Rest ( rest) => {
2134
- if has_binding_identifier ( & * rest. arg , sym, decls) {
2134
+ if has_binding_identifier ( & rest. arg , sym, decls) {
2135
2135
return true ;
2136
2136
}
2137
2137
}
0 commit comments