summaryrefslogtreecommitdiffhomepage
path: root/talpid-openvpn-plugin/src
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2025-07-09 12:51:42 +0200
committerLinus Färnstrand <linus@mullvad.net>2025-07-09 12:51:42 +0200
commitbef9cb8441e1369865ff345550ebb9c528dd3aca (patch)
treefcac2cea9e6f7c6e270bedbdc5a81b0c0096f555 /talpid-openvpn-plugin/src
parentb21c24e98078145b19b6fc0eb75163e4b4364253 (diff)
parent485d6b1b81ddf9a038dc93c4ed0f000d9aff107b (diff)
downloadmullvadvpn-bef9cb8441e1369865ff345550ebb9c528dd3aca.tar.xz
mullvadvpn-bef9cb8441e1369865ff345550ebb9c528dd3aca.zip
Merge branch 'fix-rust-warnings-prepare-1.88'
Diffstat (limited to 'talpid-openvpn-plugin/src')
-rw-r--r--talpid-openvpn-plugin/src/lib.rs4
-rw-r--r--talpid-openvpn-plugin/src/processing.rs5
2 files changed, 7 insertions, 2 deletions
diff --git a/talpid-openvpn-plugin/src/lib.rs b/talpid-openvpn-plugin/src/lib.rs
index 571991917d..2331278072 100644
--- a/talpid-openvpn-plugin/src/lib.rs
+++ b/talpid-openvpn-plugin/src/lib.rs
@@ -10,8 +10,10 @@ pub enum Error {
#[error("No core server id given as first argument")]
MissingCoreServerId,
+ // TODO: Remove box when upgrading tonic to a version with
+ // https://github.com/hyperium/tonic/pull/2282
#[error("Failed to send an event to daemon over the IPC channel")]
- SendEvent(#[source] tonic::Status),
+ SendEvent(#[source] Box<tonic::Status>),
#[error("Unable to start Tokio runtime")]
CreateRuntime(#[source] io::Error),
diff --git a/talpid-openvpn-plugin/src/processing.rs b/talpid-openvpn-plugin/src/processing.rs
index cb2a422138..6a4bfced93 100644
--- a/talpid-openvpn-plugin/src/processing.rs
+++ b/talpid-openvpn-plugin/src/processing.rs
@@ -71,6 +71,9 @@ impl EventProcessor {
.block_on(self.ipc_client.route_predown(details)),
other => return Err(Error::UnhandledEvent(other)),
};
- response.map(|_| ()).map_err(Error::SendEvent)
+ match response {
+ Ok(_) => Ok(()),
+ Err(e) => Err(Error::SendEvent(Box::new(e))),
+ }
}
}