Use anyhow for formatting and handling errors

This works better than doing it manually, and it significantly reduces
the amount of boilerplate needed.
This commit is contained in:
Robbert van der Helm
2020-07-16 14:31:00 +02:00
parent f48b5e66ca
commit 1ee2fe4746
5 changed files with 76 additions and 112 deletions
+7
View File
@@ -9,6 +9,12 @@ dependencies = [
"memchr",
]
[[package]]
name = "anyhow"
version = "1.0.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f"
[[package]]
name = "arrayref"
version = "0.3.6"
@@ -665,6 +671,7 @@ name = "yabridgectl"
version = "1.2.1"
dependencies = [
"aho-corasick",
"anyhow",
"clap",
"colored",
"lazy_static",