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.
This commit is contained in:
Thomas Eizinger
2025-05-16 14:23:53 +10:00
committed by GitHub
parent 6165555add
commit 3300c0fe02

View File

@@ -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)?;