@@ -147,7 +147,7 @@ fn remove_default_toolchain_autoinstalls() {
147
147
fn remove_override_toolchain_err_handling ( ) {
148
148
setup ( & |config| {
149
149
let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
150
- config. change_dir ( tempdir. path ( ) , & || {
150
+ config. change_dir ( tempdir. path ( ) , & |config | {
151
151
config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
152
152
config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
153
153
config. expect_ok ( & [ "rustup" , "toolchain" , "remove" , "beta" ] ) ;
@@ -222,7 +222,7 @@ fn override_overrides_default() {
222
222
setup ( & |config| {
223
223
let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
224
224
config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
225
- config. change_dir ( tempdir. path ( ) , & || {
225
+ config. change_dir ( tempdir. path ( ) , & |config | {
226
226
config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
227
227
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
228
228
} ) ;
@@ -236,19 +236,19 @@ fn multiple_overrides() {
236
236
let tempdir2 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
237
237
238
238
config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
239
- config. change_dir ( tempdir1. path ( ) , & || {
239
+ config. change_dir ( tempdir1. path ( ) , & |config | {
240
240
config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
241
241
} ) ;
242
- config. change_dir ( tempdir2. path ( ) , & || {
242
+ config. change_dir ( tempdir2. path ( ) , & |config | {
243
243
config. expect_ok ( & [ "rustup" , "override" , "add" , "stable" ] ) ;
244
244
} ) ;
245
245
246
246
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
247
247
248
- config. change_dir ( tempdir1. path ( ) , & || {
248
+ config. change_dir ( tempdir1. path ( ) , & |config | {
249
249
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
250
250
} ) ;
251
- config. change_dir ( tempdir2. path ( ) , & || {
251
+ config. change_dir ( tempdir2. path ( ) , & |config | {
252
252
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" ) ;
253
253
} ) ;
254
254
} ) ;
@@ -258,7 +258,7 @@ fn multiple_overrides() {
258
258
fn change_override ( ) {
259
259
setup ( & |config| {
260
260
let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
261
- config. change_dir ( tempdir. path ( ) , & || {
261
+ config. change_dir ( tempdir. path ( ) , & |config | {
262
262
config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
263
263
config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
264
264
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-beta-1.2.0" ) ;
@@ -270,7 +270,7 @@ fn change_override() {
270
270
fn remove_override_no_default ( ) {
271
271
setup ( & |config| {
272
272
let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
273
- config. change_dir ( tempdir. path ( ) , & || {
273
+ config. change_dir ( tempdir. path ( ) , & |config | {
274
274
config. expect_ok ( & [ "rustup" , "override" , "add" , "nightly" ] ) ;
275
275
config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
276
276
config. expect_err (
@@ -285,7 +285,7 @@ fn remove_override_no_default() {
285
285
fn remove_override_with_default ( ) {
286
286
setup ( & |config| {
287
287
let tempdir = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
288
- config. change_dir ( tempdir. path ( ) , & || {
288
+ config. change_dir ( tempdir. path ( ) , & |config | {
289
289
config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
290
290
config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
291
291
config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
@@ -300,18 +300,18 @@ fn remove_override_with_multiple_overrides() {
300
300
let tempdir1 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
301
301
let tempdir2 = tempfile:: Builder :: new ( ) . prefix ( "rustup" ) . tempdir ( ) . unwrap ( ) ;
302
302
config. expect_ok ( & [ "rustup" , "default" , "nightly" ] ) ;
303
- config. change_dir ( tempdir1. path ( ) , & || {
303
+ config. change_dir ( tempdir1. path ( ) , & |config | {
304
304
config. expect_ok ( & [ "rustup" , "override" , "add" , "beta" ] ) ;
305
305
} ) ;
306
- config. change_dir ( tempdir2. path ( ) , & || {
306
+ config. change_dir ( tempdir2. path ( ) , & |config | {
307
307
config. expect_ok ( & [ "rustup" , "override" , "add" , "stable" ] ) ;
308
308
} ) ;
309
309
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
310
- config. change_dir ( tempdir1. path ( ) , & || {
310
+ config. change_dir ( tempdir1. path ( ) , & |config | {
311
311
config. expect_ok ( & [ "rustup" , "override" , "remove" ] ) ;
312
312
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" ) ;
313
313
} ) ;
314
- config. change_dir ( tempdir2. path ( ) , & || {
314
+ config. change_dir ( tempdir2. path ( ) , & |config | {
315
315
config. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" ) ;
316
316
} ) ;
317
317
} ) ;
0 commit comments