Skip to content
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

Cleanup cfg blocks #1735

Merged
merged 1 commit into from
Jun 9, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub unsafe fn clearenv() -> std::result::Result<(), ClearEnvError> {
cfg_if! {
if #[cfg(any(target_os = "fuchsia",
target_os = "wasi",
target_env = "wasi",
target_env = "uclibc",
target_os = "linux",
target_os = "android",
Expand Down
6 changes: 3 additions & 3 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
target_os = "android",
target_os = "emscripten",
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_os = "wasi",
target_env = "uclibc",
target_os = "freebsd"
))]
Expand Down Expand Up @@ -828,7 +828,7 @@ pub fn fspacectl_all(fd: RawFd, offset: libc::off_t, len: libc::off_t)
target_os = "android",
target_os = "emscripten",
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_os = "wasi",
target_env = "uclibc",
target_os = "freebsd"
))]
Expand Down Expand Up @@ -877,7 +877,7 @@ mod posix_fadvise {
target_os = "dragonfly",
target_os = "emscripten",
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_os = "wasi",
target_os = "freebsd"
))]
pub fn posix_fallocate(fd: RawFd, offset: libc::off_t, len: libc::off_t) -> Result<()> {
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ feature! {
}
#[cfg(any(target_os = "dragonfly",
target_os = "freebsd",
target_os = "fushsia",
target_os = "linux",
target_os = "netbsd"))]
feature! {
Expand Down
3 changes: 1 addition & 2 deletions src/net/if_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ libc_bitflags!(
target_os = "freebsd",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "osx"))]
target_os = "openbsd"))]
#[cfg_attr(docsrs, doc(cfg(all())))]
IFF_SIMPLEX;
/// Supports multicast. (see
Expand Down
6 changes: 2 additions & 4 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ sockopt_impl!(
#[cfg(any(target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "linux",
target_os = "nacl"))]
target_os = "linux"))]
#[cfg(feature = "net")]
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
Expand Down Expand Up @@ -993,8 +992,7 @@ mod test {
}

#[cfg(any(target_os = "freebsd",
target_os = "linux",
target_os = "nacl"))]
target_os = "linux"))]
#[test]
fn can_get_listen_on_tcp_socket() {
use super::super::*;
Expand Down
3 changes: 1 addition & 2 deletions test/sys/test_sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ fn test_so_tcp_keepalive() {
#[cfg(any(target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "linux",
target_os = "nacl"))] {
target_os = "linux"))] {
let x = getsockopt(fd, sockopt::TcpKeepIdle).unwrap();
setsockopt(fd, sockopt::TcpKeepIdle, &(x + 1)).unwrap();
assert_eq!(getsockopt(fd, sockopt::TcpKeepIdle).unwrap(), x + 1);
Expand Down
4 changes: 2 additions & 2 deletions test/test_fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ mod linux_android {
target_os = "android",
target_os = "emscripten",
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_os = "wasi",
target_env = "uclibc",
target_os = "freebsd"))]
mod test_posix_fadvise {
Expand Down Expand Up @@ -495,7 +495,7 @@ mod test_posix_fadvise {
target_os = "dragonfly",
target_os = "emscripten",
target_os = "fuchsia",
any(target_os = "wasi", target_env = "wasi"),
target_os = "wasi",
target_os = "freebsd"))]
mod test_posix_fallocate {

Expand Down