@@ -59,13 +59,13 @@ export PATH="$HOME/apple/bin"
59
59
assert ! ( cmd. output( ) . unwrap( ) . status. success( ) ) ;
60
60
let mut rcs = files. iter ( ) ;
61
61
let env = rcs. next ( ) . unwrap ( ) ;
62
- let envfile = fs:: read_to_string ( & env) . unwrap ( ) ;
62
+ let envfile = fs:: read_to_string ( env) . unwrap ( ) ;
63
63
let ( _, envfile_export) = envfile. split_at ( envfile. find ( "export PATH" ) . unwrap_or ( 0 ) ) ;
64
64
assert_eq ! ( & envfile_export[ ..DEFAULT_EXPORT . len( ) ] , DEFAULT_EXPORT ) ;
65
65
66
66
for rc in rcs {
67
67
let expected = source ( "$HOME/.cargo" , POSIX_SH ) ;
68
- let new_profile = fs:: read_to_string ( & rc) . unwrap ( ) ;
68
+ let new_profile = fs:: read_to_string ( rc) . unwrap ( ) ;
69
69
assert_eq ! ( new_profile, expected) ;
70
70
}
71
71
} ) ;
@@ -86,7 +86,7 @@ export PATH="$HOME/apple/bin"
86
86
87
87
let expected = FAKE_RC . to_owned ( ) + & source ( config. cargodir . display ( ) , POSIX_SH ) ;
88
88
for rc in & rcs {
89
- let new_rc = fs:: read_to_string ( & rc) . unwrap ( ) ;
89
+ let new_rc = fs:: read_to_string ( rc) . unwrap ( ) ;
90
90
assert_eq ! ( new_rc, expected) ;
91
91
}
92
92
} )
@@ -191,9 +191,9 @@ export PATH="$HOME/apple/bin"
191
191
192
192
expect_ok ( config, & INIT_NONE ) ;
193
193
194
- let new1 = fs:: read_to_string ( & path1) . unwrap ( ) ;
194
+ let new1 = fs:: read_to_string ( path1) . unwrap ( ) ;
195
195
assert_eq ! ( new1, expected) ;
196
- let new2 = fs:: read_to_string ( & path2) . unwrap ( ) ;
196
+ let new2 = fs:: read_to_string ( path2) . unwrap ( ) ;
197
197
assert_eq ! ( new2, expected) ;
198
198
}
199
199
} ) ;
@@ -221,7 +221,7 @@ export PATH="$HOME/apple/bin"
221
221
expect_ok ( config, & [ "rustup" , "self" , "uninstall" , "-y" ] ) ;
222
222
223
223
for rc in & rcs {
224
- let new_rc = fs:: read_to_string ( & rc) . unwrap ( ) ;
224
+ let new_rc = fs:: read_to_string ( rc) . unwrap ( ) ;
225
225
assert_eq ! ( new_rc, FAKE_RC ) ;
226
226
}
227
227
} )
@@ -255,11 +255,11 @@ export PATH="$HOME/apple/bin"
255
255
assert ! ( cmd. output( ) . unwrap( ) . status. success( ) ) ;
256
256
let fixed_rc = FAKE_RC . to_owned ( ) + & source ( "$HOME/.cargo" , POSIX_SH ) ;
257
257
for rc in & rcs {
258
- let new_rc = fs:: read_to_string ( & rc) . unwrap ( ) ;
258
+ let new_rc = fs:: read_to_string ( rc) . unwrap ( ) ;
259
259
assert_eq ! ( new_rc, fixed_rc) ;
260
260
}
261
261
for rc in & zprofiles {
262
- let new_rc = fs:: read_to_string ( & rc) . unwrap ( ) ;
262
+ let new_rc = fs:: read_to_string ( rc) . unwrap ( ) ;
263
263
assert_eq ! ( new_rc, FAKE_RC ) ;
264
264
}
265
265
} )
@@ -291,14 +291,14 @@ export PATH="$HOME/apple/bin"
291
291
raw:: write_file ( rc, & old_rc) . unwrap ( ) ;
292
292
}
293
293
294
- let mut cmd = clitools:: cmd ( config, "rustup" , & [ "self" , "uninstall" , "-y" ] ) ;
294
+ let mut cmd = clitools:: cmd ( config, "rustup" , [ "self" , "uninstall" , "-y" ] ) ;
295
295
cmd. env ( "SHELL" , "zsh" ) ;
296
296
cmd. env ( "ZDOTDIR" , zdotdir. path ( ) ) ;
297
297
cmd. env_remove ( "CARGO_HOME" ) ;
298
298
assert ! ( cmd. output( ) . unwrap( ) . status. success( ) ) ;
299
299
300
300
for rc in & rcs {
301
- let new_rc = fs:: read_to_string ( & rc) . unwrap ( ) ;
301
+ let new_rc = fs:: read_to_string ( rc) . unwrap ( ) ;
302
302
// It's not ideal, but it's OK, if we leave whitespace.
303
303
assert_eq ! ( new_rc, FAKE_RC ) ;
304
304
}
@@ -324,7 +324,7 @@ export PATH="$HOME/apple/bin"
324
324
let expected = format ! ( "{}. \" $HOME/.cargo/env\" \n " , FAKE_RC ) ;
325
325
assert_eq ! ( new_profile, expected) ;
326
326
327
- let mut cmd = clitools:: cmd ( config, "rustup" , & [ "self" , "uninstall" , "-y" ] ) ;
327
+ let mut cmd = clitools:: cmd ( config, "rustup" , [ "self" , "uninstall" , "-y" ] ) ;
328
328
cmd. env_remove ( "CARGO_HOME" ) ;
329
329
assert ! ( cmd. output( ) . unwrap( ) . status. success( ) ) ;
330
330
0 commit comments