summaryrefslogtreecommitdiffstats
path: root/store/Cargo.toml
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-01-22 14:59:34 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-01-23 12:15:47 +0100
commitd01bb57a83b6dbef79e93639f784ee2ff6b72bf4 (patch)
tree081d6665dbff117c5b185560d8d54bf2801735a5 /store/Cargo.toml
parentd7f6a55911589af3c6f0c321330c59d2a3538ae6 (diff)
Use the failure crate to handle errors.
- The failure crate is a young error handling solution for Rust. It may change the API, but since we pin our dependencies, this should not be a problem for us, albeit a bit inconvenient. - Introduction of the crate is a bit noisy, but not as bad as anticipated, because failure magically handles all errors used in the standard library. - Matching on concrete error values requires downcasting before matching, which seems a bit unidiomatic. This is the cost of using and "chaining" arbitrary error types. This is something that may be improved later on in the library or language. - Having said that, using the error type in the tool was nice. I did not have to use a downcast, so maybe my worries about downcasts are unjustified because it is not such a common use case after all. On the other hand, the tool is quite simple and our only mode of failure is to print the message.
Diffstat (limited to 'store/Cargo.toml')
-rw-r--r--store/Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/store/Cargo.toml b/store/Cargo.toml
index 47fbd373..cca0dc15 100644
--- a/store/Cargo.toml
+++ b/store/Cargo.toml
@@ -14,6 +14,7 @@ sequoia-core = { path = "../core" }
sequoia-net = { path = "../net" }
capnp = "0.8"
capnp-rpc = "0.8"
+failure = "0.1.1"
futures = "0.1.17"
rand = "0.3"
rusqlite = "0.12.0"