Rm unused BinstallError::VersionWarning

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-12 18:34:20 +10:00
parent c87941211c
commit aecc474f29
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -166,22 +166,6 @@ pub enum BinstallError {
v: semver::Version, v: semver::Version,
}, },
/// Warning: The resolved version may not be what was meant.
///
/// This occurs when using the `--version` option with a bare version, like `--version 1.2.3`.
/// That is parsed as the semver requirement `^1.2.3`, but the user may have expected that to
/// be an exact version (which should be specified with `--version '=1.2.3'`.
///
/// - Code: `binstall::version::warning`
/// - Exit: none (runtime warning only)
#[error("version semantic mismatch: {ver} <> {req}")]
#[diagnostic(
severity(warning),
code(binstall::version::warning),
help("You specified `--version {req}` but the package resolved that to '{ver}'.\nUse `--version '={req}'` if you want an exact match.")
)]
VersionWarning { ver: String, req: String },
/// This occurs when you specified `--version` while also using /// This occurs when you specified `--version` while also using
/// form `$crate_name@$ver` tp specify version requirements. /// form `$crate_name@$ver` tp specify version requirements.
#[error("duplicate version requirements")] #[error("duplicate version requirements")]
@ -217,7 +201,6 @@ impl BinstallError {
VersionReq { .. } => 81, VersionReq { .. } => 81,
VersionMismatch { .. } => 82, VersionMismatch { .. } => 82,
VersionUnavailable { .. } => 83, VersionUnavailable { .. } => 83,
VersionWarning { .. } => unimplemented!("BUG: warnings do not terminate"),
DuplicateVersionReq => 84, DuplicateVersionReq => 84,
}; };