mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 21:18:42 +00:00
Add new variant BinstallError::DuplicateVersionReq
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
38c8bc8cf2
commit
41961ce218
1 changed files with 7 additions and 0 deletions
|
@ -182,6 +182,12 @@ pub enum BinstallError {
|
|||
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")]
|
||||
#[diagnostic(severity(error), code(binstall::version::requirement))]
|
||||
DuplicateVersionReq,
|
||||
}
|
||||
|
||||
impl BinstallError {
|
||||
|
@ -209,6 +215,7 @@ impl BinstallError {
|
|||
VersionMismatch { .. } => 82,
|
||||
VersionUnavailable { .. } => 83,
|
||||
VersionWarning { .. } => unimplemented!("BUG: warnings do not terminate"),
|
||||
DuplicateVersionReq => 84,
|
||||
};
|
||||
|
||||
// reserved codes
|
||||
|
|
Loading…
Add table
Reference in a new issue