Skip to content

Commit fe4af4b

Browse files
bors[bot]asomers
andauthored
Merge #2043
2043: Clippy cleanup: r=asomers a=asomers fix the new clippy::non_minimal_cfg lint Co-authored-by: Alan Somers <[email protected]>
2 parents ae66999 + e42c358 commit fe4af4b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/fcntl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ pub fn vmsplice(
701701
}
702702
}
703703

704-
#[cfg(any(target_os = "linux"))]
704+
#[cfg(target_os = "linux")]
705705
#[cfg(feature = "fs")]
706706
libc_bitflags!(
707707
/// Mode argument flags for fallocate determining operation performed on a given range.
@@ -741,7 +741,7 @@ feature! {
741741
///
742742
/// Allows the caller to directly manipulate the allocated disk space for the
743743
/// file referred to by fd.
744-
#[cfg(any(target_os = "linux"))]
744+
#[cfg(target_os = "linux")]
745745
#[cfg(feature = "fs")]
746746
pub fn fallocate(
747747
fd: RawFd,

src/sys/socket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl SockProtocol {
236236
#[allow(non_upper_case_globals)]
237237
pub const CanBcm: SockProtocol = SockProtocol::NetlinkUserSock; // Matches libc::CAN_BCM
238238
}
239-
#[cfg(any(target_os = "linux"))]
239+
#[cfg(target_os = "linux")]
240240
libc_bitflags! {
241241
/// Configuration flags for `SO_TIMESTAMPING` interface
242242
///

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ sockopt_impl!(
683683
libc::IP6T_SO_ORIGINAL_DST,
684684
libc::sockaddr_in6
685685
);
686-
#[cfg(any(target_os = "linux"))]
686+
#[cfg(target_os = "linux")]
687687
sockopt_impl!(
688688
/// Specifies exact type of timestamping information collected by the kernel
689689
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
@@ -702,7 +702,7 @@ sockopt_impl!(
702702
libc::SO_TIMESTAMP,
703703
bool
704704
);
705-
#[cfg(all(target_os = "linux"))]
705+
#[cfg(target_os = "linux")]
706706
sockopt_impl!(
707707
/// Enable or disable the receiving of the `SO_TIMESTAMPNS` control message.
708708
ReceiveTimestampns,

test/test_fcntl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ mod linux_android {
238238
use nix::unistd::{close, pipe, read, write};
239239

240240
use tempfile::tempfile;
241-
#[cfg(any(target_os = "linux"))]
241+
#[cfg(target_os = "linux")]
242242
use tempfile::NamedTempFile;
243243

244244
use crate::*;
@@ -355,7 +355,7 @@ mod linux_android {
355355
close(wr).unwrap();
356356
}
357357

358-
#[cfg(any(target_os = "linux"))]
358+
#[cfg(target_os = "linux")]
359359
#[test]
360360
fn test_fallocate() {
361361
let tmp = NamedTempFile::new().unwrap();

0 commit comments

Comments
 (0)