summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim@hulthe.net>2024-02-26 14:24:15 +0100
committerDavid Lönnhager <david.l@mullvad.net>2024-02-27 10:38:19 +0100
commita6d3578d256349ffe74b7c6a7a80ac2d70b7f68e (patch)
tree92d6bfab07a4d7d8d88fce7680ffd8278c37d4ce /mullvad-cli
parent0a4915b113263f8353663e4fc07297d2862f2bc0 (diff)
downloadmullvadvpn-a6d3578d256349ffe74b7c6a7a80ac2d70b7f68e.tar.xz
mullvadvpn-a6d3578d256349ffe74b7c6a7a80ac2d70b7f68e.zip
Replace err_derive with thiserror
`err_derive` is unmaintained and will probably stop working with rust edition 2024. `thiserror` is almost a drop-in replacement. This commit simply replaces all occurences of `derive(err_derive::Error)` with `derive(thiserror::Error)` and fixes the attributes, but the Error and Display impls should be identical.
Diffstat (limited to 'mullvad-cli')
-rw-r--r--mullvad-cli/Cargo.toml2
-rw-r--r--mullvad-cli/src/cmds/proxies.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/mullvad-cli/Cargo.toml b/mullvad-cli/Cargo.toml
index 13f3878a14..516296eef0 100644
--- a/mullvad-cli/Cargo.toml
+++ b/mullvad-cli/Cargo.toml
@@ -18,7 +18,7 @@ path = "src/main.rs"
anyhow = "1.0"
chrono = { workspace = true }
clap = { workspace = true }
-err-derive = { workspace = true }
+thiserror = { workspace = true }
futures = "0.3"
itertools = "0.10"
natord = "1.0.9"
diff --git a/mullvad-cli/src/cmds/proxies.rs b/mullvad-cli/src/cmds/proxies.rs
index 5c8a79ff6c..68ab1c036c 100644
--- a/mullvad-cli/src/cmds/proxies.rs
+++ b/mullvad-cli/src/cmds/proxies.rs
@@ -5,10 +5,10 @@ use talpid_types::net::{
Endpoint, TransportProtocol,
};
-#[derive(err_derive::Error, Debug)]
+#[derive(thiserror::Error, Debug)]
pub enum Error {
- #[error(display = "{}", _0)]
- InvalidAuth(#[error(source)] talpid_types::net::proxy::Error),
+ #[error(transparent)]
+ InvalidAuth(#[from] talpid_types::net::proxy::Error),
}
#[derive(Args, Debug, Clone)]