Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit 658ba19

Browse files
author
Pat Hickey
authored
Merge pull request #578 from bytecodealliance/pch/thiserror_pedantry
thiserror::Error derivations: #[from] implies #[source]
2 parents 8ace8ba + 34121ee commit 658ba19

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

lucet-runtime/lucet-runtime-internals/src/error.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ pub enum Error {
4747

4848
/// Errors arising during dynamic loading with [`DlModule`](struct.DlModule.html).
4949
#[error("Dynamic loading error: {0}")]
50-
DlError(
51-
#[from]
52-
#[source]
53-
crate::module::DlError,
54-
),
50+
DlError(#[from] crate::module::DlError),
5551

5652
#[error("Instance not returned")]
5753
InstanceNotReturned,

lucet-runtime/lucet-runtime-internals/src/module/dl.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,9 @@ use raw_cpuid::CpuId;
1919
#[derive(Debug, Error)]
2020
pub enum DlError {
2121
#[error("Loading: {0}")]
22-
Loading(
23-
#[from]
24-
#[source]
25-
libloading::Error,
26-
),
22+
Loading(#[from] libloading::Error),
2723
#[error("IO: {0}")]
28-
Io(
29-
#[from]
30-
#[source]
31-
std::io::Error,
32-
),
24+
Io(#[from] std::io::Error),
3325
}
3426

3527
fn check_feature_support(module_features: &ModuleFeatures) -> Result<(), Error> {

0 commit comments

Comments
 (0)