diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Cargo.toml | 1 | ||||
-rw-r--r-- | core/src/lib.rs | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml index 71a40247..d6a95c53 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -24,3 +24,4 @@ maintenance = { status = "actively-developed" } dirs = "2.0" failure = "0.1.2" tempfile = "3.1" +thiserror = "1" diff --git a/core/src/lib.rs b/core/src/lib.rs index 1fda8453..aa6ba30d 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -268,16 +268,16 @@ impl Config { /// Result type for Sequoia. pub type Result<T> = ::std::result::Result<T, failure::Error>; -#[derive(Fail, Debug)] +#[derive(thiserror::Error, Debug)] /// Errors for Sequoia. pub enum Error { /// The network policy was violated by the given action. - #[fail(display = "Unmet network policy requirement: {}", _0)] + #[error("Unmet network policy requirement: {0}")] NetworkPolicyViolation(NetworkPolicy), /// An `io::Error` occurred. - #[fail(display = "{}", _0)] - IoError(#[cause] io::Error), + #[error("{0}")] + IoError(#[from] io::Error), } /* Network policy. */ |