File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
turbopack-node/src/worker_pool Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -366,14 +366,13 @@ impl DiskWatcher {
366366 return false ;
367367 }
368368 path. components ( ) . any ( |component| {
369- if let Component :: Normal ( name) = component {
370- if let Some ( name_str) = name. to_str ( ) {
369+ if let Component :: Normal ( name) = component
370+ && let Some ( name_str) = name. to_str ( ) {
371371 return self
372372 . ignored_paths
373373 . iter ( )
374374 . any ( |ignored| ignored. as_str ( ) == name_str) ;
375375 }
376- }
377376 false
378377 } )
379378 }
Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ impl WorkerThreadPool {
9999
100100 if let Some ( worker_id) = idle. pop ( ) {
101101 return Ok ( ( worker_id, AcquiredPermits :: Idle { concurrency_permit } ) ) ;
102- } else {
103- }
102+ }
104103 }
105104
106105 let ( tx, rx) = oneshot:: channel ( ) ;
@@ -110,8 +109,7 @@ impl WorkerThreadPool {
110109 let mut idle = self . state . idle_workers . lock ( ) ;
111110 if let Some ( worker_id) = idle. pop ( ) {
112111 return Ok ( ( worker_id, AcquiredPermits :: Idle { concurrency_permit } ) ) ;
113- } else {
114- }
112+ }
115113 waiters. push ( tx) ;
116114 }
117115
Original file line number Diff line number Diff line change @@ -159,9 +159,8 @@ impl EcmascriptChunkItem for StaticUrlJsChunkItem {
159159 . asset_url ( self . static_asset . path ( ) . owned ( ) . await ?, self . tag . clone ( ) )
160160 . await ?;
161161
162- let code = if asset_url. starts_with ( "__RUNTIME_PUBLIC_PATH__" ) {
162+ let code = if let Some ( asset_path ) = asset_url. strip_prefix ( "__RUNTIME_PUBLIC_PATH__" ) {
163163 // For runtime publicPath, use the getPublicPath() runtime function
164- let asset_path = & asset_url[ "__RUNTIME_PUBLIC_PATH__" . len ( ) ..] ;
165164 format ! (
166165 "{TURBOPACK_EXPORT_VALUE}({TURBOPACK_PUBLIC_PATH}() + {path});" ,
167166 path = StringifyJs ( asset_path)
You can’t perform that action at this time.
0 commit comments