From 3300c0fe0242e064c28443be4e7af968f0a50137 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 16 May 2025 14:23:53 +1000 Subject: [PATCH] chore(rust): fix windows static analysis errors (#9162) The `static-analysis` job for Windows was not yet part of the rule set and therefore some clippy errors slipped through when we merged #9159. --- rust/bin-shared/src/tun_device_manager/windows.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/bin-shared/src/tun_device_manager/windows.rs b/rust/bin-shared/src/tun_device_manager/windows.rs index 533061b77..57267af77 100644 --- a/rust/bin-shared/src/tun_device_manager/windows.rs +++ b/rust/bin-shared/src/tun_device_manager/windows.rs @@ -339,7 +339,7 @@ impl tun::Tun for Tun { ready!( self.state .as_mut() - .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Internal state gone"))? + .ok_or_else(|| io::Error::other("Internal state gone"))? .outbound_tx .poll_reserve(cx) .map_err(io::Error::other)? @@ -352,7 +352,7 @@ impl tun::Tun for Tun { fn send(&mut self, packet: IpPacket) -> io::Result<()> { self.state .as_mut() - .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Internal state gone"))? + .ok_or_else(|| io::Error::other("Internal state gone"))? .outbound_tx .send_item(packet) .map_err(io::Error::other)?;