Skip to content

Commit 457d326

Browse files
committed
Simplify two cfg attributes
1 parent 0cd03cc commit 457d326

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sys/unix.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,8 +1831,8 @@ impl crate::Socket {
18311831
/// Sets the value for the `SO_SETFIB` option on this socket.
18321832
///
18331833
/// Bind socket to the specified forwarding table (VRF) on a FreeBSD.
1834-
#[cfg(all(feature = "all", any(target_os = "freebsd")))]
1835-
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", any(target_os = "freebsd")))))]
1834+
#[cfg(all(feature = "all", target_os = "freebsd"))]
1835+
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", target_os = "freebsd"))))]
18361836
pub fn set_fib(&self, fib: u32) -> io::Result<()> {
18371837
syscall!(setsockopt(
18381838
self.as_raw(),
@@ -2587,8 +2587,8 @@ impl crate::Socket {
25872587
/// Therefore, there is no corresponding `set` helper.
25882588
///
25892589
/// For more information about this option, see [Linux patch](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5daab9db7b65df87da26fd8cfa695fb9546a1ddb)
2590-
#[cfg(all(feature = "all", any(target_os = "linux")))]
2591-
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", any(target_os = "linux")))))]
2590+
#[cfg(all(feature = "all", target_os = "linux"))]
2591+
#[cfg_attr(docsrs, doc(cfg(all(feature = "all", target_os = "linux"))))]
25922592
pub fn cookie(&self) -> io::Result<u64> {
25932593
unsafe { getsockopt::<libc::c_ulonglong>(self.as_raw(), libc::SOL_SOCKET, libc::SO_COOKIE) }
25942594
}

0 commit comments

Comments
 (0)