File tree Expand file tree Collapse file tree 2 files changed +6
-16
lines changed Expand file tree Collapse file tree 2 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,6 @@ pub struct ImportRewriteTransformer<'a> {
22
22
}
23
23
24
24
impl < ' a > VisitMut for ImportRewriteTransformer < ' a > {
25
- fn visit_mut_module ( & mut self , module : & mut Module ) {
26
- module. visit_mut_children_with ( self ) ;
27
- }
28
-
29
25
fn visit_mut_import_decl ( & mut self , node : & mut ImportDecl ) {
30
26
node. visit_mut_children_with ( self ) ;
31
27
Original file line number Diff line number Diff line change @@ -195,10 +195,8 @@ pub async fn create_npm_tarball<'a>(
195
195
specifier_rewriter,
196
196
RewriteKind :: Source ,
197
197
) ;
198
- package_files. insert (
199
- js. specifier . path ( ) . to_owned ( ) ,
200
- rewritten. as_bytes ( ) . to_vec ( ) ,
201
- ) ;
198
+ package_files
199
+ . insert ( js. specifier . path ( ) . to_owned ( ) , rewritten. into_bytes ( ) ) ;
202
200
}
203
201
deno_ast:: MediaType :: Dts | deno_ast:: MediaType :: Dmts => {
204
202
let parsed_source = sources. get_parsed_source ( & js. specifier ) . unwrap ( ) ;
@@ -211,10 +209,8 @@ pub async fn create_npm_tarball<'a>(
211
209
specifier_rewriter,
212
210
RewriteKind :: Declaration ,
213
211
) ;
214
- package_files. insert (
215
- js. specifier . path ( ) . to_owned ( ) ,
216
- rewritten. as_bytes ( ) . to_vec ( ) ,
217
- ) ;
212
+ package_files
213
+ . insert ( js. specifier . path ( ) . to_owned ( ) , rewritten. into_bytes ( ) ) ;
218
214
}
219
215
deno_ast:: MediaType :: Jsx => {
220
216
let parsed_source = sources. get_parsed_source ( & js. specifier ) . unwrap ( ) ;
@@ -235,10 +231,8 @@ pub async fn create_npm_tarball<'a>(
235
231
specifier_rewriter,
236
232
RewriteKind :: Source ,
237
233
) ;
238
- package_files. insert (
239
- js. specifier . path ( ) . to_owned ( ) ,
240
- rewritten. as_bytes ( ) . to_vec ( ) ,
241
- ) ;
234
+ package_files
235
+ . insert ( js. specifier . path ( ) . to_owned ( ) , rewritten. into_bytes ( ) ) ;
242
236
243
237
let parsed_source = sources. get_parsed_source ( & js. specifier ) . unwrap ( ) ;
244
238
let source =
You can’t perform that action at this time.
0 commit comments