File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -362,22 +362,19 @@ mod windows {
362
362
fn install_uninstall_affect_path ( ) {
363
363
clitools:: test ( Scenario :: Empty , & |config| {
364
364
with_saved_path ( & mut || {
365
- let path = config. cargodir . join ( "bin" ) . display ( ) . to_string ( ) ;
365
+ let cfg_path = config. cargodir . join ( "bin" ) . display ( ) . to_string ( ) ;
366
+ let get_path_ = || get_path ( ) . unwrap ( ) . unwrap ( ) . to_string ( ) ;
366
367
367
368
config. expect_ok ( & INIT_NONE ) ;
368
369
assert ! (
369
- get_path( )
370
- . unwrap( )
371
- . unwrap( )
372
- . to_string( )
373
- . contains( path. trim_matches( '"' ) ) ,
370
+ get_path_( ) . contains( cfg_path. trim_matches( '"' ) ) ,
374
371
"`{}` not in `{}`" ,
375
- path ,
376
- get_path ( ) . unwrap ( ) . unwrap ( )
372
+ cfg_path ,
373
+ get_path_ ( )
377
374
) ;
378
375
379
376
config. expect_ok ( & [ "rustup" , "self" , "uninstall" , "-y" ] ) ;
380
- assert ! ( !get_path ( ) . unwrap ( ) . unwrap ( ) . to_string ( ) . contains( & path ) ) ;
377
+ assert ! ( !get_path_ ( ) . contains( & cfg_path ) ) ;
381
378
} )
382
379
} ) ;
383
380
}
You can’t perform that action at this time.
0 commit comments