Skip to content

Commit

Permalink
Silence cast-sign-loss Clippy warning
Browse files Browse the repository at this point in the history
There are no valid negative socket levels or option names.
  • Loading branch information
Thomasdezeeuw committed Mar 30, 2024
1 parent 96c74b0 commit cee8920
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit cee8920

Please sign in to comment.