Skip to content

Commit 5d7bd84

Browse files
BerrysoftDarksonn
andauthored
Apply suggestions from code review
Simplify `cfg`s Co-authored-by: Alice Ryhl <[email protected]>
1 parent 8148306 commit 5d7bd84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/socket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ impl Socket {
968968
/// For more information about this option, see [`set_passcred`].
969969
///
970970
/// [`set_passcred`]: Socket::set_passcred
971-
#[cfg(all(unix, any(target_os = "linux", target_os = "cygwin")))]
971+
#[cfg(any(target_os = "linux", target_os = "cygwin"))]
972972
pub fn passcred(&self) -> io::Result<bool> {
973973
unsafe {
974974
getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_PASSCRED)
@@ -980,7 +980,7 @@ impl Socket {
980980
///
981981
/// If this option is enabled, enables the receiving of the `SCM_CREDENTIALS`
982982
/// control messages.
983-
#[cfg(all(unix, any(target_os = "linux", target_os = "cygwin")))]
983+
#[cfg(any(target_os = "linux", target_os = "cygwin"))]
984984
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
985985
unsafe {
986986
setsockopt(

0 commit comments

Comments
 (0)