Skip to content

Commit

Permalink
Update toolchain help message (#486)
Browse files Browse the repository at this point in the history
* Update toolchain.rs

* update override string
  • Loading branch information
sdankel authored Sep 19, 2023
1 parent 051c3b2 commit 364e8ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub enum ToolchainCommand {

#[derive(Debug, Parser)]
pub struct InstallCommand {
/// Toolchain name [possible values: latest, beta-1, beta-2, beta-3, nightly]
/// Toolchain name [possible values: latest, beta-1, beta-2, beta-3, beta-4, nightly]
pub name: String,
}

Expand Down
6 changes: 3 additions & 3 deletions src/toolchain_override.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ where
|_| {
Err(Error::invalid_value(
serde::de::Unexpected::Str(&channel_str),
&"one of <latest-YYYY-MM-DD|nightly-YYYY-MM-DD|beta-1|beta-2|beta-3>",
&"one of <latest-YYYY-MM-DD|nightly-YYYY-MM-DD|beta-1|beta-2|beta-3|beta-4>",
))
},
Result::Ok,
Expand Down Expand Up @@ -260,15 +260,15 @@ channel = "nightly"
let e = result.unwrap_err();
assert_eq!(e
.to_string(),
"invalid value: string \"latest\", expected one of <latest-YYYY-MM-DD|nightly-YYYY-MM-DD|beta-1|beta-2|beta-3> for key `toolchain.channel`".to_string());
"invalid value: string \"latest\", expected one of <latest-YYYY-MM-DD|nightly-YYYY-MM-DD|beta-1|beta-2|beta-3|beta-4> for key `toolchain.channel`".to_string());

let result = OverrideCfg::from_toml(NIGHTLY);
assert!(result.is_err());
let e = result.unwrap_err();

assert_eq!(e
.to_string(),
"invalid value: string \"nightly\", expected one of <latest-YYYY-MM-DD|nightly-YYYY-MM-DD|beta-1|beta-2|beta-3> for key `toolchain.channel`".to_string());
"invalid value: string \"nightly\", expected one of <latest-YYYY-MM-DD|nightly-YYYY-MM-DD|beta-1|beta-2|beta-3|beta-4> for key `toolchain.channel`".to_string());
}

#[test]
Expand Down

0 comments on commit 364e8ea

Please sign in to comment.