@@ -30,7 +30,7 @@ use crate::{Config, CommandTemplate};
3030
3131pub type GitDate = Date < Utc > ;
3232
33- const YYYY_MM_DD : & ' static str = "%Y-%m-%d" ;
33+ const YYYY_MM_DD : & str = "%Y-%m-%d" ;
3434
3535pub ( crate ) const NIGHTLY_SERVER : & str = "https://static.rust-lang.org/dist" ;
3636const CI_SERVER : & str = "https://s3-us-west-1.amazonaws.com/rust-lang-ci2" ;
@@ -70,7 +70,7 @@ impl fmt::Display for Toolchain {
7070 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
7171 match self . spec {
7272 ToolchainSpec :: Ci { ref commit, alt } => {
73- let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
73+ let alt_s = if alt { "-alt" . to_string ( ) } else { String :: new ( ) } ;
7474 write ! ( f, "{}{}" , commit, alt_s)
7575 }
7676 ToolchainSpec :: Nightly { ref date } => write ! ( f, "nightly-{}" , date. format( YYYY_MM_DD ) ) ,
@@ -82,7 +82,7 @@ impl Toolchain {
8282 pub ( crate ) fn rustup_name ( & self ) -> String {
8383 match self . spec {
8484 ToolchainSpec :: Ci { ref commit, alt } => {
85- let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
85+ let alt_s = if alt { "-alt" . to_string ( ) } else { String :: new ( ) } ;
8686 format ! ( "bisector-ci-{}{}-{}" , commit, alt_s, self . host)
8787 }
8888 // N.B. We need to call this with a nonstandard name so that rustup utilizes the
@@ -152,7 +152,7 @@ impl Toolchain {
152152 let cmd = CommandTemplate :: new (
153153 [ "rustc" , "--print" , "sysroot" ]
154154 . iter ( )
155- . map ( |s| s . to_string ( ) ) ,
155+ . map ( |s| ( * s ) . to_string ( ) ) ,
156156 ) ;
157157 let stdout = cmd. output ( ) ?. stdout ;
158158 let output = String :: from_utf8_lossy ( & stdout) ;
@@ -166,7 +166,7 @@ impl Toolchain {
166166 let cmd = CommandTemplate :: new (
167167 [ "rustup" , "toolchain" , "link" ]
168168 . iter ( )
169- . map ( |s| s . to_string ( ) )
169+ . map ( |s| ( * s ) . to_string ( ) )
170170 . chain ( iter:: once ( self . rustup_name ( ) ) )
171171 . chain ( iter:: once ( nightly_path) ) ,
172172 ) ;
@@ -203,7 +203,7 @@ impl Toolchain {
203203 match e {
204204 DownloadError :: NotFound ( url) => {
205205 return Err ( InstallError :: NotFound {
206- url : url ,
206+ url,
207207 spec : self . spec . clone ( ) ,
208208 } )
209209 }
@@ -390,7 +390,7 @@ impl fmt::Display for ToolchainSpec {
390390 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
391391 match * self {
392392 ToolchainSpec :: Ci { ref commit, alt } => {
393- let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
393+ let alt_s = if alt { "-alt" . to_string ( ) } else { String :: new ( ) } ;
394394 write ! ( f, "{}{}" , commit, alt_s)
395395 }
396396 ToolchainSpec :: Nightly { ref date } => write ! ( f, "nightly-{}" , date) ,
@@ -425,7 +425,7 @@ impl DownloadParams {
425425
426426 pub ( crate ) fn from_cfg_with_url_prefix ( cfg : & Config , url_prefix : String ) -> Self {
427427 DownloadParams {
428- url_prefix : url_prefix ,
428+ url_prefix,
429429 tmp_dir : cfg. rustup_tmp_path . clone ( ) ,
430430 install_dir : cfg. toolchains_path . clone ( ) ,
431431 install_cargo : cfg. args . with_cargo ,
0 commit comments