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 ;
2
1
use std:: fmt:: { self , Debug , Display } ;
3
2
use std:: path:: { Path , PathBuf } ;
4
3
use std:: str:: FromStr ;
@@ -303,9 +302,9 @@ impl<'a> Cfg<'a> {
303
302
// For backward compatibility
304
303
non_empty_env_var ( "RUSTUP_DIST_ROOT" , process) ?
305
304
. inspect ( |url| trace ! ( "`RUSTUP_DIST_ROOT` has been set to `{url}`" ) )
306
- . map_or ( Cow :: Borrowed ( dist:: DEFAULT_DIST_ROOT ) , Cow :: Owned )
307
305
. as_ref ( )
308
- . trim_end_matches ( "/dist" )
306
+ . map ( |root| root. trim_end_matches ( "/dist" ) )
307
+ . unwrap_or ( dist:: DEFAULT_DIST_SERVER )
309
308
. to_owned ( )
310
309
}
311
310
} ;
Original file line number Diff line number Diff line change @@ -41,9 +41,6 @@ pub(crate) use triple::*;
41
41
42
42
pub static DEFAULT_DIST_SERVER : & str = "https://static.rust-lang.org" ;
43
43
44
- // Deprecated
45
- pub ( crate ) static DEFAULT_DIST_ROOT : & str = "https://static.rust-lang.org/dist" ;
46
-
47
44
const TOOLSTATE_MSG : & str =
48
45
"If you require these components, please install and use the latest successful build version,\n \
49
46
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