Skip to content

Commit 4820047

Browse files
bors[bot]asomers
andcommitted
Merge #2043
2043: Clippy cleanup: r=asomers a=asomers fix the new clippy::non_minimal_cfg lint Co-authored-by: Alan Somers <asomers@gmail.com>
1 parent a67007d commit 4820047

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
@@ -638,7 +638,7 @@ pub fn vmsplice(
638638
}
639639
}
640640

641-
#[cfg(any(target_os = "linux"))]
641+
#[cfg(target_os = "linux")]
642642
#[cfg(feature = "fs")]
643643
libc_bitflags!(
644644
/// Mode argument flags for fallocate determining operation performed on a given range.
@@ -678,7 +678,7 @@ feature! {
678678
///
679679
/// Allows the caller to directly manipulate the allocated disk space for the
680680
/// file referred to by fd.
681-
#[cfg(any(target_os = "linux"))]
681+
#[cfg(target_os = "linux")]
682682
#[cfg(feature = "fs")]
683683
pub fn fallocate(
684684
fd: RawFd,

src/sys/socket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ pub enum SockProtocol {
229229
EthAll = (libc::ETH_P_ALL as u16).to_be() as i32,
230230
}
231231

232-
#[cfg(any(target_os = "linux"))]
232+
#[cfg(target_os = "linux")]
233233
libc_bitflags! {
234234
/// Configuration flags for `SO_TIMESTAMPING` interface
235235
///

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ sockopt_impl!(
678678
libc::IP6T_SO_ORIGINAL_DST,
679679
libc::sockaddr_in6
680680
);
681-
#[cfg(any(target_os = "linux"))]
681+
#[cfg(target_os = "linux")]
682682
sockopt_impl!(
683683
/// Specifies exact type of timestamping information collected by the kernel
684684
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
@@ -697,7 +697,7 @@ sockopt_impl!(
697697
libc::SO_TIMESTAMP,
698698
bool
699699
);
700-
#[cfg(all(target_os = "linux"))]
700+
#[cfg(target_os = "linux")]
701701
sockopt_impl!(
702702
/// Enable or disable the receiving of the `SO_TIMESTAMPNS` control message.
703703
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)