mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Fix BinstallError::CrateContext
: Forward diagnostics of field CrateContextError::err
(#586)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
a69db83aa6
commit
887ebb6f6f
1 changed files with 3 additions and 1 deletions
|
@ -32,11 +32,12 @@ pub struct VersionParseError {
|
||||||
pub err: semver::Error,
|
pub err: semver::Error,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Diagnostic, Error)]
|
||||||
#[error("For crate {crate_name}: {err}")]
|
#[error("For crate {crate_name}: {err}")]
|
||||||
pub struct CrateContextError {
|
pub struct CrateContextError {
|
||||||
crate_name: CompactString,
|
crate_name: CompactString,
|
||||||
#[source]
|
#[source]
|
||||||
|
#[diagnostic(transparent)]
|
||||||
err: BinstallError,
|
err: BinstallError,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,6 +293,7 @@ pub enum BinstallError {
|
||||||
|
|
||||||
/// A wrapped error providing the context of which crate the error is about.
|
/// A wrapped error providing the context of which crate the error is about.
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
|
#[diagnostic(transparent)]
|
||||||
CrateContext(Box<CrateContextError>),
|
CrateContext(Box<CrateContextError>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue