@@ -250,7 +250,7 @@ fn remove_default_toolchain_autoinstalls() {
250250fn remove_override_toolchain_err_handling ( ) {
251251 setup ( & |config| {
252252 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
253- config. change_dir ( tempdir. path ( ) , & || {
253+ config. change_dir ( tempdir. path ( ) , & |config | {
254254 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
255255 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
256256 config. expect_ok ( & [ "rustup" , "toolchain" , "remove" , "beta" ] ) ;
@@ -354,7 +354,7 @@ fn override_overrides_default() {
354354 setup ( & |config| {
355355 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
356356 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
357- config. change_dir ( tempdir. path ( ) , & || {
357+ config. change_dir ( tempdir. path ( ) , & |config | {
358358 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
359359 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
360360 } ) ;
@@ -368,19 +368,19 @@ fn multiple_overrides() {
368368 let tempdir2 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
369369
370370 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
371- config. change_dir ( tempdir1. path ( ) , & || {
371+ config. change_dir ( tempdir1. path ( ) , & |config | {
372372 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
373373 } ) ;
374- config. change_dir ( tempdir2. path ( ) , & || {
374+ config. change_dir ( tempdir2. path ( ) , & |config | {
375375 config. expect_ok ( & [ "rustup" , "override" , "add" , "stable" ] ) ;
376376 } ) ;
377377
378378 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
379379
380- config. change_dir ( tempdir1. path ( ) , & || {
380+ config. change_dir ( tempdir1. path ( ) , & |config | {
381381 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
382382 } ) ;
383- config. change_dir ( tempdir2. path ( ) , & || {
383+ config. change_dir ( tempdir2. path ( ) , & |config | {
384384 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" ) ;
385385 } ) ;
386386 } ) ;
@@ -404,7 +404,7 @@ fn override_windows_root() {
404404 // Really sketchy to be messing with C:\ in a test...
405405 let prefix = prefix. as_os_str ( ) . to_str ( ) . unwrap ( ) ;
406406 let prefix = format ! ( "{prefix}\\ " ) ;
407- config. change_dir ( & PathBuf :: from ( & prefix) , & || {
407+ config. change_dir ( & PathBuf :: from ( & prefix) , & |config | {
408408 config. expect_ok ( & [ "rustup" , "default" , "stable" ] ) ;
409409 config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
410410 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
@@ -418,7 +418,7 @@ fn override_windows_root() {
418418fn change_override ( ) {
419419 setup ( & |config| {
420420 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
421- config. change_dir ( tempdir. path ( ) , & || {
421+ config. change_dir ( tempdir. path ( ) , & |config | {
422422 config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
423423 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
424424 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
@@ -430,7 +430,7 @@ fn change_override() {
430430fn remove_override_no_default ( ) {
431431 setup ( & |config| {
432432 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
433- config. change_dir ( tempdir. path ( ) , & || {
433+ config. change_dir ( tempdir. path ( ) , & |config | {
434434 config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
435435 config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
436436 config. expect_err (
@@ -445,7 +445,7 @@ fn remove_override_no_default() {
445445fn remove_override_with_default ( ) {
446446 setup ( & |config| {
447447 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
448- config. change_dir ( tempdir. path ( ) , & || {
448+ config. change_dir ( tempdir. path ( ) , & |config | {
449449 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
450450 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
451451 config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
@@ -460,18 +460,18 @@ fn remove_override_with_multiple_overrides() {
460460 let tempdir1 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
461461 let tempdir2 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
462462 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
463- config. change_dir ( tempdir1. path ( ) , & || {
463+ config. change_dir ( tempdir1. path ( ) , & |config | {
464464 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
465465 } ) ;
466- config. change_dir ( tempdir2. path ( ) , & || {
466+ config. change_dir ( tempdir2. path ( ) , & |config | {
467467 config. expect_ok ( & [ "rustup" , "override" , "add" , "stable" ] ) ;
468468 } ) ;
469469 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
470- config. change_dir ( tempdir1. path ( ) , & || {
470+ config. change_dir ( tempdir1. path ( ) , & |config | {
471471 config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
472472 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
473473 } ) ;
474- config. change_dir ( tempdir2. path ( ) , & || {
474+ config. change_dir ( tempdir2. path ( ) , & |config | {
475475 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" ) ;
476476 } ) ;
477477 } ) ;
0 commit comments