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 {
362362 fn install_uninstall_affect_path ( ) {
363363 clitools:: test ( Scenario :: Empty , & |config| {
364364 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 ( ) ;
366367
367368 config. expect_ok ( & INIT_NONE ) ;
368369 assert ! (
369- get_path( )
370- . unwrap( )
371- . unwrap( )
372- . to_string( )
373- . contains( path. trim_matches( '"' ) ) ,
370+ get_path_( ) . contains( cfg_path. trim_matches( '"' ) ) ,
374371 "`{}` not in `{}`" ,
375- path ,
376- get_path ( ) . unwrap ( ) . unwrap ( )
372+ cfg_path ,
373+ get_path_ ( )
377374 ) ;
378375
379376 config. expect_ok ( & [ "rustup" , "self" , "uninstall" , "-y" ] ) ;
380- assert ! ( !get_path ( ) . unwrap ( ) . unwrap ( ) . to_string ( ) . contains( & path ) ) ;
377+ assert ! ( !get_path_ ( ) . contains( & cfg_path ) ) ;
381378 } )
382379 } ) ;
383380 }
You can’t perform that action at this time.
0 commit comments