@@ -45,7 +45,7 @@ pub static DEFAULT_DIST_SERVER: &str = "https://static.rust-lang.org";
45
45
pub ( crate ) static DEFAULT_DIST_ROOT : & str = "https://static.rust-lang.org/dist" ;
46
46
47
47
const TOOLSTATE_MSG : & str =
48
- "If you require these components , please install and use the latest successful build version,\n \
48
+ "If you require the component(s) , please install and use the latest successful build version,\n \
49
49
which you can find at <https://rust-lang.github.io/rustup-components-history>.\n \n After determining \
50
50
the correct date, install it with a command such as:\n \n \
51
51
rustup toolchain install nightly-2018-12-27\n \n \
@@ -73,15 +73,6 @@ fn components_missing_msg(cs: &[Component], manifest: &ManifestV2, toolchain: &s
73
73
c. description( manifest) ,
74
74
toolchain,
75
75
) ;
76
-
77
- if toolchain. starts_with ( "nightly" ) {
78
- let _ = write ! ( buf, "{nightly_tips}" ) ;
79
- }
80
-
81
- let _ = write ! (
82
- buf,
83
- "If you don't need the component, you could try a minimal installation with:\n \n {suggestion}\n \n {TOOLSTATE_MSG}"
84
- ) ;
85
76
}
86
77
cs => {
87
78
let cs_str = cs
@@ -93,18 +84,17 @@ fn components_missing_msg(cs: &[Component], manifest: &ManifestV2, toolchain: &s
93
84
buf,
94
85
"some components are unavailable for download for channel '{toolchain}': {cs_str}"
95
86
) ;
96
-
97
- if toolchain. starts_with ( "nightly" ) {
98
- let _ = write ! ( buf, "{nightly_tips}" ) ;
99
- }
100
-
101
- let _ = write ! (
102
- buf,
103
- "If you don't need the components, you could try a minimal installation with:\n \n {suggestion}\n \n {TOOLSTATE_MSG}"
104
- ) ;
105
87
}
106
88
}
107
89
90
+ if toolchain. starts_with ( "nightly" ) {
91
+ let _ = write ! ( buf, "{nightly_tips}" ) ;
92
+
93
+ let _ = write ! (
94
+ buf,
95
+ "If you don't need the component(s), you could try a minimal installation with:\n \n {suggestion}\n \n {TOOLSTATE_MSG}"
96
+ ) ;
97
+ }
108
98
String :: from_utf8 ( buf) . unwrap ( )
109
99
}
110
100
0 commit comments