install: support vX.Y.Z in addition to X.Y.Z (#8297)

automerge
This commit is contained in:
Michael Vines
2020-02-14 20:35:40 -07:00
committed by GitHub
parent 1bf2285fa2
commit 335675c51c
5 changed files with 51 additions and 40 deletions

View File

@@ -11,7 +11,6 @@ edition = "2018"
[dependencies]
clap = "2.33.0"
rpassword = "4.0"
semver = "0.9.0"
solana-remote-wallet = { path = "../remote-wallet", version = "0.24.0" }
solana-sdk = { path = "../sdk", version = "0.24.0" }
tiny-bip39 = "0.7.0"

View File

@@ -86,20 +86,6 @@ pub fn is_url(string: String) -> Result<(), String> {
}
}
pub fn is_semver(semver: &str) -> Result<(), String> {
match semver::Version::parse(&semver) {
Ok(_) => Ok(()),
Err(err) => Err(format!("{:?}", err)),
}
}
pub fn is_release_channel(channel: &str) -> Result<(), String> {
match channel {
"edge" | "beta" | "stable" => Ok(()),
_ => Err(format!("Invalid release channel {}", channel)),
}
}
pub fn is_port(port: String) -> Result<(), String> {
port.parse::<u16>()
.map(|_| ())