diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-05-06 06:53:52 +0200 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-05-06 10:59:40 +0200 |
| commit | 389e5bb700e3d36d7a5e1c0b599bcf100c0bc17f (patch) | |
| tree | 281b6bf5451576c0f00ca6c6178058f189ffcf44 | |
| parent | ffd6f7bcf54a6d0e24233e602ace35090f805e52 (diff) | |
| download | mullvadvpn-389e5bb700e3d36d7a5e1c0b599bcf100c0bc17f.tar.xz mullvadvpn-389e5bb700e3d36d7a5e1c0b599bcf100c0bc17f.zip | |
Run `cargo fix --edition`
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 11 | ||||
| -rw-r--r-- | mullvad-jni/src/lib.rs | 2 | ||||
| -rw-r--r-- | mullvad-problem-report/src/lib.rs | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index f90cdfa00e..e165f7e6eb 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -585,7 +585,6 @@ where { pub fn to_unbounded_sender<T>(&self) -> mpsc::UnboundedSender<T> where - InternalDaemonEvent: From<E>, T: Send + 'static, E: From<T>, { @@ -593,12 +592,10 @@ where let sender = self.sender.clone(); tokio::spawn(async move { while let Some(msg) = rx.next().await { - if let Some(tx) = sender.upgrade() { - let e: E = E::from(msg); - if tx.send(e.into()).is_err() { - return; - } - } else { + let Some(tx) = sender.upgrade() else { + return; + }; + if tx.send(InternalDaemonEvent::from(E::from(msg))).is_err() { return; }; } diff --git a/mullvad-jni/src/lib.rs b/mullvad-jni/src/lib.rs index 389323ce38..eee54cd622 100644 --- a/mullvad-jni/src/lib.rs +++ b/mullvad-jni/src/lib.rs @@ -54,7 +54,7 @@ pub enum Error { /// Throw a Java exception and return if `result` is an error macro_rules! ok_or_throw { - ($env:expr, $result:expr) => {{ + ($env:expr_2021, $result:expr_2021) => {{ match $result { Ok(val) => val, Err(err) => { diff --git a/mullvad-problem-report/src/lib.rs b/mullvad-problem-report/src/lib.rs index b2a4e22166..415d0d617a 100644 --- a/mullvad-problem-report/src/lib.rs +++ b/mullvad-problem-report/src/lib.rs @@ -35,8 +35,8 @@ const MAX_SEND_ATTEMPTS: usize = 3; /// Custom macro to write a line to an output formatter that uses platform-specific newline /// character sequences. macro_rules! write_line { - ($fmt:expr $(,)*) => { write!($fmt, "{}", LINE_SEPARATOR) }; - ($fmt:expr, $pattern:expr $(, $arg:expr)* $(,)*) => { + ($fmt:expr_2021 $(,)*) => { write!($fmt, "{}", LINE_SEPARATOR) }; + ($fmt:expr_2021, $pattern:expr_2021 $(, $arg:expr_2021)* $(,)*) => { write!($fmt, $pattern, $( $arg ),*) .and_then(|_| write!($fmt, "{}", LINE_SEPARATOR)) }; |
