mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +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.")
|
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 },
|
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 {
|
impl BinstallError {
|
||||||
|
@ -209,6 +215,7 @@ impl BinstallError {
|
||||||
VersionMismatch { .. } => 82,
|
VersionMismatch { .. } => 82,
|
||||||
VersionUnavailable { .. } => 83,
|
VersionUnavailable { .. } => 83,
|
||||||
VersionWarning { .. } => unimplemented!("BUG: warnings do not terminate"),
|
VersionWarning { .. } => unimplemented!("BUG: warnings do not terminate"),
|
||||||
|
DuplicateVersionReq => 84,
|
||||||
};
|
};
|
||||||
|
|
||||||
// reserved codes
|
// reserved codes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue