@@ -1171,10 +1171,9 @@ impl FileSystemPath {
11711171 /// None when the joined path would leave the filesystem root.
11721172 #[ turbo_tasks:: function]
11731173 pub async fn try_join ( & self , path : RcStr ) -> Result < Vc < FileSystemPathOption > > {
1174- let this = self ;
1175- if let Some ( path) = join_path ( & this. path , & path) {
1174+ if let Some ( path) = join_path ( & self . path , & path) {
11761175 Ok ( Vc :: cell ( Some (
1177- Self :: new_normalized ( this . fs , path. into ( ) ) . resolve ( ) . await ?,
1176+ Self :: new_normalized ( self . fs , path. into ( ) ) . resolve ( ) . await ?,
11781177 ) ) )
11791178 } else {
11801179 Ok ( FileSystemPathOption :: none ( ) )
@@ -1185,11 +1184,10 @@ impl FileSystemPath {
11851184 /// None when the joined path would leave the current path.
11861185 #[ turbo_tasks:: function]
11871186 pub async fn try_join_inside ( & self , path : RcStr ) -> Result < Vc < FileSystemPathOption > > {
1188- let this = self ;
1189- if let Some ( path) = join_path ( & this. path , & path) {
1190- if path. starts_with ( & * this. path ) {
1187+ if let Some ( path) = join_path ( & self . path , & path) {
1188+ if path. starts_with ( & * self . path ) {
11911189 return Ok ( Vc :: cell ( Some (
1192- Self :: new_normalized ( this . fs , path. into ( ) ) . resolve ( ) . await ?,
1190+ Self :: new_normalized ( self . fs , path. into ( ) ) . resolve ( ) . await ?,
11931191 ) ) ) ;
11941192 }
11951193 }
@@ -1217,8 +1215,7 @@ impl FileSystemPath {
12171215
12181216 #[ turbo_tasks:: function]
12191217 pub async fn extension ( & self ) -> Result < Vc < RcStr > > {
1220- let this = self ;
1221- Ok ( Vc :: cell ( this. extension_ref ( ) . unwrap_or ( "" ) . into ( ) ) )
1218+ Ok ( Vc :: cell ( self . extension_ref ( ) . unwrap_or ( "" ) . into ( ) ) )
12221219 }
12231220
12241221 #[ turbo_tasks:: function]
@@ -1235,10 +1232,9 @@ impl FileSystemPath {
12351232 /// extension.
12361233 #[ turbo_tasks:: function]
12371234 pub async fn with_extension ( & self , extension : RcStr ) -> Result < Vc < FileSystemPath > > {
1238- let this = self ;
1239- let ( path_without_extension, _) = this. split_extension ( ) ;
1235+ let ( path_without_extension, _) = self . split_extension ( ) ;
12401236 Ok ( Self :: new_normalized (
1241- this . fs ,
1237+ self . fs ,
12421238 // Like `Path::with_extension` and `PathBuf::set_extension`, if the extension is empty,
12431239 // we remove the extension altogether.
12441240 match extension. is_empty ( ) {
@@ -1258,8 +1254,7 @@ impl FileSystemPath {
12581254 /// * Otherwise, the portion of the file name before the final `.`
12591255 #[ turbo_tasks:: function]
12601256 pub async fn file_stem ( & self ) -> Result < Vc < Option < RcStr > > > {
1261- let this = self ;
1262- let ( _, file_stem, _) = this. split_file_stem_extension ( ) ;
1257+ let ( _, file_stem, _) = self . split_file_stem_extension ( ) ;
12631258 if file_stem. is_empty ( ) {
12641259 return Ok ( Vc :: cell ( None ) ) ;
12651260 }
0 commit comments