@@ -161,9 +161,9 @@ fn rustup_installed() -> bool {
161
161
}
162
162
163
163
fn stage_dir_exists ( stage_path : & str ) -> bool {
164
- match fs:: create_dir ( & stage_path[ .. ] ) {
164
+ match fs:: create_dir ( & stage_path) {
165
165
Ok ( _) => true ,
166
- Err ( _) => Path :: new ( & stage_path[ .. ] ) . exists ( ) ,
166
+ Err ( _) => Path :: new ( & stage_path) . exists ( ) ,
167
167
}
168
168
}
169
169
@@ -179,7 +179,7 @@ fn attempt_toolchain_link(stage_path: &str) {
179
179
return ;
180
180
}
181
181
182
- if try_link_toolchain ( & stage_path[ .. ] ) {
182
+ if try_link_toolchain ( & stage_path) {
183
183
println ! (
184
184
"Added `stage1` rustup toolchain; try `cargo +stage1 build` on a separate rust project to run a newly-built toolchain"
185
185
) ;
@@ -188,7 +188,7 @@ fn attempt_toolchain_link(stage_path: &str) {
188
188
println ! (
189
189
"To manually link stage 1 build to `stage1` toolchain, run:\n
190
190
`rustup toolchain link stage1 {}`" ,
191
- & stage_path[ .. ]
191
+ & stage_path
192
192
) ;
193
193
}
194
194
}
@@ -222,7 +222,7 @@ fn toolchain_is_linked() -> bool {
222
222
fn try_link_toolchain ( stage_path : & str ) -> bool {
223
223
Command :: new ( "rustup" )
224
224
. stdout ( std:: process:: Stdio :: null ( ) )
225
- . args ( & [ "toolchain" , "link" , "stage1" , & stage_path[ .. ] ] )
225
+ . args ( & [ "toolchain" , "link" , "stage1" , & stage_path] )
226
226
. output ( )
227
227
. map_or ( false , |output| output. status . success ( ) )
228
228
}
0 commit comments