Skip to content

Commit 61314a2

Browse files
nathaniel-bennettThomasdezeeuw
authored andcommitted
applied rustfmt changes
1 parent e90add9 commit 61314a2

File tree

3 files changed

+4
-28
lines changed

3 files changed

+4
-28
lines changed

src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,7 @@ impl Protocol {
307307
/// Protocol corresponding to `MPTCP`.
308308
pub const MPTCP: Protocol = Protocol(sys::IPPROTO_MPTCP);
309309

310-
#[cfg(all(
311-
feature = "all",
312-
any(
313-
target_os = "freebsd",
314-
target_os = "linux",
315-
)
316-
))]
310+
#[cfg(all(feature = "all", any(target_os = "freebsd", target_os = "linux")))]
317311
/// Protocol corresponding to `SCTP`.
318312
pub const SCTP: Protocol = Protocol(sys::IPPROTO_SCTP);
319313
}

src/sys/unix.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,7 @@ pub(crate) use libc::{SOCK_DGRAM, SOCK_STREAM};
6565
// Used in `Protocol`.
6666
#[cfg(target_os = "linux")]
6767
pub(crate) use libc::IPPROTO_MPTCP;
68-
#[cfg(all(
69-
feature = "all",
70-
any(
71-
target_os = "freebsd",
72-
target_os = "linux",
73-
)
74-
))]
68+
#[cfg(all(feature = "all", any(target_os = "freebsd", target_os = "linux")))]
7569
pub(crate) use libc::IPPROTO_SCTP;
7670
pub(crate) use libc::{IPPROTO_ICMP, IPPROTO_ICMPV6, IPPROTO_TCP, IPPROTO_UDP};
7771
// Used in `SockAddr`.
@@ -398,13 +392,7 @@ impl_debug!(
398392
libc::IPPROTO_UDP,
399393
#[cfg(target_os = "linux")]
400394
libc::IPPROTO_MPTCP,
401-
#[cfg(all(
402-
feature = "all",
403-
any(
404-
target_os = "freebsd",
405-
target_os = "linux",
406-
)
407-
))]
395+
#[cfg(all(feature = "all", any(target_os = "freebsd", target_os = "linux")))]
408396
libc::IPPROTO_SCTP,
409397
);
410398

tests/socket.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,7 @@ fn protocol_fmt_debug() {
108108
(Protocol::UDP, "IPPROTO_UDP"),
109109
#[cfg(target_os = "linux")]
110110
(Protocol::MPTCP, "IPPROTO_MPTCP"),
111-
#[cfg(all(
112-
feature = "all",
113-
any(
114-
target_os = "freebsd",
115-
target_os = "linux",
116-
)
117-
))]
111+
#[cfg(all(feature = "all", any(target_os = "freebsd", target_os = "linux")))]
118112
(Protocol::SCTP, "IPPROTO_SCTP"),
119113
(500.into(), "500"),
120114
];

0 commit comments

Comments
 (0)