Skip to content

Clippy cleanup: #2043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ pub fn vmsplice(
}
}

#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
#[cfg(feature = "fs")]
libc_bitflags!(
/// Mode argument flags for fallocate determining operation performed on a given range.
Expand Down Expand Up @@ -741,7 +741,7 @@ feature! {
///
/// Allows the caller to directly manipulate the allocated disk space for the
/// file referred to by fd.
#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
#[cfg(feature = "fs")]
pub fn fallocate(
fd: RawFd,
Expand Down
2 changes: 1 addition & 1 deletion src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl SockProtocol {
#[allow(non_upper_case_globals)]
pub const CanBcm: SockProtocol = SockProtocol::NetlinkUserSock; // Matches libc::CAN_BCM
}
#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
libc_bitflags! {
/// Configuration flags for `SO_TIMESTAMPING` interface
///
Expand Down
4 changes: 2 additions & 2 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ sockopt_impl!(
libc::IP6T_SO_ORIGINAL_DST,
libc::sockaddr_in6
);
#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
sockopt_impl!(
/// Specifies exact type of timestamping information collected by the kernel
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
Expand All @@ -702,7 +702,7 @@ sockopt_impl!(
libc::SO_TIMESTAMP,
bool
);
#[cfg(all(target_os = "linux"))]
#[cfg(target_os = "linux")]
sockopt_impl!(
/// Enable or disable the receiving of the `SO_TIMESTAMPNS` control message.
ReceiveTimestampns,
Expand Down
4 changes: 2 additions & 2 deletions test/test_fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ mod linux_android {
use nix::unistd::{close, pipe, read, write};

use tempfile::tempfile;
#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
use tempfile::NamedTempFile;

use crate::*;
Expand Down Expand Up @@ -355,7 +355,7 @@ mod linux_android {
close(wr).unwrap();
}

#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
#[test]
fn test_fallocate() {
let tmp = NamedTempFile::new().unwrap();
Expand Down