File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
turbopack-core/src/resolve
turbopack-node/src/render Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ impl Task for CheckTask {
23
23
GLOBALS . set ( & Default :: default ( ) , || {
24
24
//
25
25
let cm = Arc :: new ( SourceMap :: default ( ) ) ;
26
- let Ok ( fm) = cm. load_file ( & self . filename . clone ( ) ) else {
26
+ let Ok ( fm) = cm. load_file ( & self . filename ) else {
27
27
return Ok ( false ) ;
28
28
} ;
29
29
let mut errors = vec ! [ ] ;
Original file line number Diff line number Diff line change @@ -1392,7 +1392,7 @@ async fn find_package(
1392
1392
for name in names. iter ( ) {
1393
1393
let fs_path = lookup_path. join ( name) ?;
1394
1394
if let Some ( fs_path) = dir_exists ( fs_path, & mut affecting_sources) . await ? {
1395
- let fs_path = fs_path. join ( & package_name. clone ( ) ) ?;
1395
+ let fs_path = fs_path. join ( & package_name) ?;
1396
1396
if let Some ( fs_path) =
1397
1397
dir_exists ( fs_path. clone ( ) , & mut affecting_sources) . await ?
1398
1398
{
@@ -1431,7 +1431,7 @@ async fn find_package(
1431
1431
if excluded_extensions. contains ( extension) {
1432
1432
continue ;
1433
1433
}
1434
- let package_file = package_dir. append ( & extension. clone ( ) ) ?;
1434
+ let package_file = package_dir. append ( extension) ?;
1435
1435
if let Some ( package_file) = exists ( package_file, & mut affecting_sources) . await ?
1436
1436
{
1437
1437
packages. push ( FindPackageItem :: PackageFile ( package_file) ) ;
Original file line number Diff line number Diff line change @@ -1631,7 +1631,7 @@ pub async fn read_matches(
1631
1631
prefix. pop ( ) ;
1632
1632
}
1633
1633
if let Some ( pos) = pat. match_position ( & prefix) {
1634
- let fs_path = lookup_dir. join ( & key. clone ( ) ) ?;
1634
+ let fs_path = lookup_dir. join ( key) ?;
1635
1635
if let LinkContent :: Link { link_type, .. } =
1636
1636
& * fs_path. read_link ( ) . await ?
1637
1637
{
@@ -1653,7 +1653,7 @@ pub async fn read_matches(
1653
1653
}
1654
1654
prefix. push ( '/' ) ;
1655
1655
if let Some ( pos) = pat. match_position ( & prefix) {
1656
- let fs_path = lookup_dir. join ( & key. clone ( ) ) ?;
1656
+ let fs_path = lookup_dir. join ( key) ?;
1657
1657
if let LinkContent :: Link { link_type, .. } =
1658
1658
& * fs_path. read_link ( ) . await ?
1659
1659
&& link_type. contains ( LinkType :: DIRECTORY )
@@ -1665,7 +1665,7 @@ pub async fn read_matches(
1665
1665
}
1666
1666
}
1667
1667
if let Some ( pos) = pat. could_match_position ( & prefix) {
1668
- let fs_path = lookup_dir. join ( & key. clone ( ) ) ?;
1668
+ let fs_path = lookup_dir. join ( key) ?;
1669
1669
if let LinkContent :: Link { link_type, .. } =
1670
1670
& * fs_path. read_link ( ) . await ?
1671
1671
&& link_type. contains ( LinkType :: DIRECTORY )
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ impl GetContentSourceContent for NodeApiContentSource {
127
127
Ok ( ContentSourceContent :: HttpProxy ( render_proxy_operation (
128
128
self . cwd . clone ( ) ,
129
129
self . env ,
130
- self . server_root . join ( & path. clone ( ) ) ?,
130
+ self . server_root . join ( & path) ?,
131
131
ResolvedVc :: upcast ( entry. module ) ,
132
132
entry. runtime_entries ,
133
133
entry. chunking_context ,
Original file line number Diff line number Diff line change @@ -291,8 +291,8 @@ async fn prepare_test(resource: RcStr) -> Result<Vc<PreparedTest>> {
291
291
resource_path. display( )
292
292
) ) ?;
293
293
let relative_path: RcStr = sys_to_unix ( relative_path. to_str ( ) . unwrap ( ) ) . into ( ) ;
294
- let path = root_fs. root ( ) . await ?. join ( & relative_path. clone ( ) ) ?;
295
- let project_path = project_root. join ( & relative_path. clone ( ) ) ?;
294
+ let path = root_fs. root ( ) . await ?. join ( & relative_path) ?;
295
+ let project_path = project_root. join ( & relative_path) ?;
296
296
let tests_path = project_fs
297
297
. root ( )
298
298
. await ?
You can’t perform that action at this time.
0 commit comments