mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-18 17:26:19 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user