@@ -147,7 +147,7 @@ fn remove_default_toolchain_autoinstalls() {
147147fn remove_override_toolchain_err_handling ( ) {
148148 setup ( & |config| {
149149 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
150- config. change_dir ( tempdir. path ( ) , & || {
150+ config. change_dir ( tempdir. path ( ) , & |config | {
151151 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
152152 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
153153 config. expect_ok ( & [ "rustup" , "toolchain" , "remove" , "beta" ] ) ;
@@ -222,7 +222,7 @@ fn override_overrides_default() {
222222 setup ( & |config| {
223223 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
224224 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
225- config. change_dir ( tempdir. path ( ) , & || {
225+ config. change_dir ( tempdir. path ( ) , & |config | {
226226 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
227227 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
228228 } ) ;
@@ -236,19 +236,19 @@ fn multiple_overrides() {
236236 let tempdir2 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
237237
238238 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
239- config. change_dir ( tempdir1. path ( ) , & || {
239+ config. change_dir ( tempdir1. path ( ) , & |config | {
240240 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
241241 } ) ;
242- config. change_dir ( tempdir2. path ( ) , & || {
242+ config. change_dir ( tempdir2. path ( ) , & |config | {
243243 config. expect_ok ( & [ "rustup" , "override" , "add" , "stable" ] ) ;
244244 } ) ;
245245
246246 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
247247
248- config. change_dir ( tempdir1. path ( ) , & || {
248+ config. change_dir ( tempdir1. path ( ) , & |config | {
249249 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
250250 } ) ;
251- config. change_dir ( tempdir2. path ( ) , & || {
251+ config. change_dir ( tempdir2. path ( ) , & |config | {
252252 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" ) ;
253253 } ) ;
254254 } ) ;
@@ -258,7 +258,7 @@ fn multiple_overrides() {
258258fn change_override ( ) {
259259 setup ( & |config| {
260260 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
261- config. change_dir ( tempdir. path ( ) , & || {
261+ config. change_dir ( tempdir. path ( ) , & |config | {
262262 config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
263263 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
264264 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
@@ -270,7 +270,7 @@ fn change_override() {
270270fn remove_override_no_default ( ) {
271271 setup ( & |config| {
272272 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
273- config. change_dir ( tempdir. path ( ) , & || {
273+ config. change_dir ( tempdir. path ( ) , & |config | {
274274 config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
275275 config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
276276 config. expect_err (
@@ -285,7 +285,7 @@ fn remove_override_no_default() {
285285fn remove_override_with_default ( ) {
286286 setup ( & |config| {
287287 let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
288- config. change_dir ( tempdir. path ( ) , & || {
288+ config. change_dir ( tempdir. path ( ) , & |config | {
289289 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
290290 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
291291 config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
@@ -300,18 +300,18 @@ fn remove_override_with_multiple_overrides() {
300300 let tempdir1 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
301301 let tempdir2 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
302302 config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
303- config. change_dir ( tempdir1. path ( ) , & || {
303+ config. change_dir ( tempdir1. path ( ) , & |config | {
304304 config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
305305 } ) ;
306- config. change_dir ( tempdir2. path ( ) , & || {
306+ config. change_dir ( tempdir2. path ( ) , & |config | {
307307 config. expect_ok ( & [ "rustup" , "override" , "add" , "stable" ] ) ;
308308 } ) ;
309309 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
310- config. change_dir ( tempdir1. path ( ) , & || {
310+ config. change_dir ( tempdir1. path ( ) , & |config | {
311311 config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
312312 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
313313 } ) ;
314- config. change_dir ( tempdir2. path ( ) , & || {
314+ config. change_dir ( tempdir2. path ( ) , & |config | {
315315 config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" ) ;
316316 } ) ;
317317 } ) ;
0 commit comments