From aecc474f291b0a2cbc4ff4a9363f276632ae1847 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Tue, 12 Jul 2022 18:34:20 +1000 Subject: [PATCH] Rm unused `BinstallError::VersionWarning` Signed-off-by: Jiahao XU --- src/errors.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 855a23b5..ec19f29a 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -166,22 +166,6 @@ pub enum BinstallError { 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 /// form `$crate_name@$ver` tp specify version requirements. #[error("duplicate version requirements")] @@ -217,7 +201,6 @@ impl BinstallError { VersionReq { .. } => 81, VersionMismatch { .. } => 82, VersionUnavailable { .. } => 83, - VersionWarning { .. } => unimplemented!("BUG: warnings do not terminate"), DuplicateVersionReq => 84, };