File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,6 @@ pub static DEFAULT_DIST_SERVER: &str = "https://static.rust-lang.org";
3434// Deprecated
3535pub ( crate ) static DEFAULT_DIST_ROOT : & str = "https://static.rust-lang.org/dist" ;
3636
37- // The channel patterns we support
38- static TOOLCHAIN_CHANNELS : & [ & str ] = & [
39- "nightly" ,
40- "beta" ,
41- "stable" ,
42- // Allow from 1.0.0 through to 9.999.99 with optional patch version
43- r"\d{1}\.\d{1,3}(?:\.\d{1,2})?" ,
44- ] ;
45-
4637const TOOLSTATE_MSG : & str =
4738 "If you require these components, please install and use the latest successful build version,\n \
4839 which you can find at <https://rust-lang.github.io/rustup-components-history>.\n \n After determining \
@@ -187,7 +178,15 @@ impl FromStr for ParsedToolchainDesc {
187178 static TOOLCHAIN_CHANNEL_RE : Lazy < Regex > = Lazy :: new ( || {
188179 Regex :: new ( & format ! (
189180 r"^({})(?:-(\d{{4}}-\d{{2}}-\d{{2}}))?(?:-(.+))?$" ,
190- TOOLCHAIN_CHANNELS . join( "|" )
181+ // The channel patterns we support
182+ [
183+ "nightly" ,
184+ "beta" ,
185+ "stable" ,
186+ // Allow from 1.0.0 through to 9.999.99 with optional patch version
187+ r"\d{1}\.\d{1,3}(?:\.\d{1,2})?" ,
188+ ]
189+ . join( "|" )
191190 ) )
192191 . unwrap ( )
193192 } ) ;
You can’t perform that action at this time.
0 commit comments