From cee89208cc1f106bef21691ff964baf11269c966 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Sat, 30 Mar 2024 23:53:25 +0100 Subject: [PATCH] Silence cast-sign-loss Clippy warning There are no valid negative socket levels or option names. --- src/net.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net.rs b/src/net.rs index 75cea8e..a4e2798 100644 --- a/src/net.rs +++ b/src/net.rs @@ -353,6 +353,7 @@ impl AsyncFd { /// /// The caller must ensure that `T` is the valid type for the option. #[doc(alias = "getsockopt")] + #[allow(clippy::cast_sign_loss)] // No valid negative level or optnames. pub fn socket_option<'fd, T>( &'fd self, level: libc::c_int, @@ -371,6 +372,7 @@ impl AsyncFd { /// /// The caller must ensure that `T` is the valid type for the option. #[doc(alias = "setsockopt")] + #[allow(clippy::cast_sign_loss)] // No valid negative level or optnames. pub fn set_socket_option<'fd, T>( &'fd self, level: libc::c_int,