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,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
#[derive(Debug, Diagnostic, Error)]
|
||||
#[error("For crate {crate_name}: {err}")]
|
||||
pub struct CrateContextError {
|
||||
crate_name: CompactString,
|
||||
#[source]
|
||||
#[diagnostic(transparent)]
|
||||
err: BinstallError,
|
||||
}
|
||||
|
||||
|
@ -292,6 +293,7 @@ pub enum BinstallError {
|
|||
|
||||
/// A wrapped error providing the context of which crate the error is about.
|
||||
#[error(transparent)]
|
||||
#[diagnostic(transparent)]
|
||||
CrateContext(Box<CrateContextError>),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue