Fix compile errors in fallback.rs

We never hit this in CI because we either compile for windows, some sort
of unix, or wasm. But we should at least have it compile.
This commit is contained in:
Ruediger Klaehn
2026-03-03 12:05:46 +02:00
parent 13a1c456f5
commit d3dafa00aa
+5 -3
View File
@@ -1,5 +1,6 @@
use std::{
io::{self, IoSliceMut},
num::NonZeroUsize,
sync::Mutex,
time::Instant,
};
@@ -78,8 +79,8 @@ impl UdpSocketState {
}
#[inline]
pub fn max_gso_segments(&self) -> usize {
1
pub fn max_gso_segments(&self) -> NonZeroUsize {
NonZeroUsize::MIN
}
#[inline]
@@ -121,7 +122,8 @@ fn send(socket: UdpSockRef<'_>, transmit: &Transmit<'_>) -> io::Result<()> {
socket.0.send_to(
transmit.contents,
&socket2::SockAddr::from(transmit.destination),
)
)?;
Ok(())
}
pub(crate) const BATCH_SIZE: usize = 1;