Replace deprecated 'error-chain' with 'thiserror' (#1820)

We can't use #[from] on Error::Msg(String) because String does not implement Error.
(Which it shouldn't; see e.g. https://internals.rust-lang.org/t/impl-error-for-string/8881.)
So we implement From manually for Error::Msg, since our current code was written
in that way for error-chain.
This commit is contained in:
Martin Nordholts authored and GitHub committed 2021-08-26 13:12:21 +02:00
1 parent f1c0fd7343
commit 19c3e82abf
12 files changed
+83 -77

No files matched your search

+1 -4
View File
@@ -48,6 +48,7 @@ ansi_colours = "^1.0"
console = "0.14.1"
lazy_static = { version = "1.4", optional = true }
lazycell = "1.0"
thiserror = "1.0"
wild = { version = "2.0", optional = true }
content_inspector = "0.2.4"
encoding = "0.2"
@@ -79,10 +80,6 @@ optional = true
default-features = false
features = ["suggestions", "color", "wrap_help"]
[dependencies.error-chain]
version = "0.12"
default-features = false
[dev-dependencies]
assert_cmd = "1.0.8"
serial_test = "0.5.1"