summaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-08-28 18:44:45 -0700
committerDaniel Mueller <deso@posteo.net>2020-08-28 18:44:45 -0700
commitb605614e5b3dab828e4f33c300836deab421be34 (patch)
tree5d0f250f0ae24ba595b983c79fa9bad9045a650b /Cargo.lock
parent11344455b0629f989d8b78c27ed0e7d654fc74ef (diff)
downloadnitrocli-b605614e5b3dab828e4f33c300836deab421be34.tar.gz
nitrocli-b605614e5b3dab828e4f33c300836deab421be34.tar.bz2
Use anyhow for error handling
This patch changes our error handling approach from the ground up: instead of having a globally used Error enum that contains variants for all possible errors, we now use anyhow's Error type. This approach is more dynamic (and not statically typed), but it allows for more fine grained error messages and overall more user-friendly error reporting. Overall it also is a net simplification. While we have one dynamic cast now, in order to be able to handle erroneous password/PIN entries correctly, that is considered a reasonable compromise.
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock7
1 files changed, 7 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index cb2bec3..f2f0675 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,6 +10,12 @@ dependencies = [
]
[[package]]
+name = "anyhow"
+version = "1.0.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b"
+
+[[package]]
name = "base32"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -86,6 +92,7 @@ checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
name = "nitrocli"
version = "0.3.3"
dependencies = [
+ "anyhow",
"base32",
"libc",
"nitrokey",