aboutsummaryrefslogtreecommitdiff
path: root/Cargo.toml
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
commit592d1a55f0c05c1dcba58261f327066b4832a703 (patch)
tree5d0f250f0ae24ba595b983c79fa9bad9045a650b /Cargo.toml
parenteb858f4411105ba9e9ccb0e3c270020a48637787 (diff)
downloadnitrocli-592d1a55f0c05c1dcba58261f327066b4832a703.tar.gz
nitrocli-592d1a55f0c05c1dcba58261f327066b4832a703.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.toml')
-rw-r--r--Cargo.toml3
1 files changed, 3 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 548199b..961e82f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -46,6 +46,9 @@ lto = true
codegen-units = 1
incremental = false
+[dependencies.anyhow]
+version = "1.0"
+
[dependencies.base32]
version = "0.4.0"