Skip to content

Commit a9e7e2a

Browse files
committed
fix(ip_recverr): rename IcmpError for non linux platforms
1 parent b1c723d commit a9e7e2a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

quinn-udp/src/unix.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ impl UdpSocketState {
256256
}
257257

258258
#[cfg(not(target_os = "linux"))]
259-
pub fn recv_icmp_err(&self, _socket: UdpSockRef<'_>) -> io::Result<Option<ICMPError>> {
260-
Ok(None)
259+
pub fn recv_icmp_err(&self, socket: UdpSockRef<'_>) -> io::Result<Option<()>> {
260+
recv_err(socket.0)
261261
}
262262

263263
/// The maximum amount of segments which can be transmitted if a platform
@@ -912,11 +912,10 @@ fn recv_err(io: SockRef<'_>) -> io::Result<Option<IcmpError>> {
912912
Ok(None)
913913
}
914914

915-
// I don't know about how other platforms handle this.
916-
//#[cfg(not(target_os = "linux"))]
917-
// fn recv_err(_io: &impl AsRawFd) -> io::Result<Option<(SocketAddr, ())>> {
918-
// Ok(None)
919-
// }
915+
#[cfg(not(target_os = "linux"))]
916+
fn recv_err(io: SockRef<'_>) -> io::Result<Option<()>> {
917+
Ok(None)
918+
}
920919

921920
#[cfg(not(apple_slow))]
922921
// Chosen somewhat arbitrarily; might benefit from additional tuning.

0 commit comments

Comments
 (0)