File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 1- use std:: borrow:: Cow ;
21use std:: fmt:: { self , Debug , Display } ;
32use std:: path:: { Path , PathBuf } ;
43use std:: str:: FromStr ;
@@ -303,9 +302,9 @@ impl<'a> Cfg<'a> {
303302 // For backward compatibility
304303 non_empty_env_var ( "RUSTUP_DIST_ROOT" , process) ?
305304 . inspect ( |url| trace ! ( "`RUSTUP_DIST_ROOT` has been set to `{url}`" ) )
306- . map_or ( Cow :: Borrowed ( dist:: DEFAULT_DIST_ROOT ) , Cow :: Owned )
307305 . as_ref ( )
308- . trim_end_matches ( "/dist" )
306+ . map ( |root| root. trim_end_matches ( "/dist" ) )
307+ . unwrap_or ( dist:: DEFAULT_DIST_SERVER )
309308 . to_owned ( )
310309 }
311310 } ;
Original file line number Diff line number Diff line change @@ -41,9 +41,6 @@ pub(crate) use triple::*;
4141
4242pub static DEFAULT_DIST_SERVER : & str = "https://static.rust-lang.org" ;
4343
44- // Deprecated
45- pub ( crate ) static DEFAULT_DIST_ROOT : & str = "https://static.rust-lang.org/dist" ;
46-
4744const TOOLSTATE_MSG : & str =
4845 "If you require these components, please install and use the latest successful build version,\n \
4946 which you can find at <https://rust-lang.github.io/rustup-components-history>.\n \n After determining \
You can’t perform that action at this time.
0 commit comments