Skip to content

Commit d2fe327

Browse files
authored
For tidiness, keep the target_os = "..." lists sorted alphabetically. (#1429)
1 parent 416b4c3 commit d2fe327

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

examples/process.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,64 +50,64 @@ fn main() -> rustix::io::Result<()> {
5050
println!("Stack Limit: {:?}", getrlimit(Resource::Stack));
5151
#[cfg(not(target_os = "haiku"))]
5252
println!("Core Limit: {:?}", getrlimit(Resource::Core));
53-
#[cfg(not(any(solarish, target_os = "haiku", target_os = "cygwin")))]
53+
#[cfg(not(any(solarish, target_os = "cygwin", target_os = "haiku")))]
5454
println!("Rss Limit: {:?}", getrlimit(Resource::Rss));
55-
#[cfg(not(any(solarish, target_os = "haiku", target_os = "cygwin")))]
55+
#[cfg(not(any(solarish, target_os = "cygwin", target_os = "haiku")))]
5656
println!("Nproc Limit: {:?}", getrlimit(Resource::Nproc));
5757
#[cfg(not(target_os = "solaris"))]
5858
println!("Nofile Limit: {:?}", getrlimit(Resource::Nofile));
59-
#[cfg(not(any(solarish, target_os = "aix", target_os = "haiku", target_os = "cygwin")))]
59+
#[cfg(not(any(solarish, target_os = "aix", target_os = "cygwin", target_os = "haiku")))]
6060
println!("Memlock Limit: {:?}", getrlimit(Resource::Memlock));
6161
#[cfg(not(target_os = "openbsd"))]
6262
println!("As Limit: {:?}", getrlimit(Resource::As));
6363
#[cfg(not(any(
6464
bsd,
6565
solarish,
6666
target_os = "aix",
67-
target_os = "haiku",
6867
target_os = "cygwin",
68+
target_os = "haiku",
6969
)))]
7070
println!("Locks Limit: {:?}", getrlimit(Resource::Locks));
7171
#[cfg(not(any(
7272
bsd,
7373
solarish,
7474
target_os = "aix",
75-
target_os = "haiku",
7675
target_os = "cygwin",
76+
target_os = "haiku",
7777
)))]
7878
println!("Sigpending Limit: {:?}", getrlimit(Resource::Sigpending));
7979
#[cfg(not(any(
8080
bsd,
8181
solarish,
8282
target_os = "aix",
83-
target_os = "haiku",
8483
target_os = "cygwin",
84+
target_os = "haiku",
8585
)))]
8686
println!("Msgqueue Limit: {:?}", getrlimit(Resource::Msgqueue));
8787
#[cfg(not(any(
8888
bsd,
8989
solarish,
9090
target_os = "aix",
91-
target_os = "haiku",
9291
target_os = "cygwin",
92+
target_os = "haiku",
9393
)))]
9494
println!("Nice Limit: {:?}", getrlimit(Resource::Nice));
9595
#[cfg(not(any(
9696
bsd,
9797
solarish,
9898
target_os = "aix",
99-
target_os = "haiku",
10099
target_os = "cygwin",
100+
target_os = "haiku",
101101
)))]
102102
println!("Rtprio Limit: {:?}", getrlimit(Resource::Rtprio));
103103
#[cfg(not(any(
104104
bsd,
105105
solarish,
106106
target_os = "aix",
107107
target_os = "android",
108+
target_os = "cygwin",
108109
target_os = "emscripten",
109110
target_os = "haiku",
110-
target_os = "cygwin",
111111
)))]
112112
println!("Rttime Limit: {:?}", getrlimit(Resource::Rttime));
113113
}

examples/stdio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ fn show<Fd: AsFd>(fd: Fd) -> io::Result<()> {
258258
if term.local_modes.contains(LocalModes::ECHOCTL) {
259259
print!(" ECHOCTL");
260260
}
261-
#[cfg(not(any(target_os = "redox", target_os = "cygwin")))]
261+
#[cfg(not(any(target_os = "cygwin", target_os = "redox")))]
262262
if term.local_modes.contains(LocalModes::ECHOPRT) {
263263
print!(" ECHOPRT");
264264
}
@@ -276,7 +276,7 @@ fn show<Fd: AsFd>(fd: Fd) -> io::Result<()> {
276276
if term.local_modes.contains(LocalModes::TOSTOP) {
277277
print!(" TOSTOP");
278278
}
279-
#[cfg(not(any(target_os = "redox", target_os = "cygwin")))]
279+
#[cfg(not(any(target_os = "cygwin", target_os = "redox")))]
280280
if term.local_modes.contains(LocalModes::PENDIN) {
281281
print!(" PENDIN");
282282
}

src/backend/libc/net/sockopt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,9 +770,9 @@ pub(crate) fn ip_tos(fd: BorrowedFd<'_>) -> io::Result<u8> {
770770
#[cfg(any(
771771
apple,
772772
linux_like,
773+
target_os = "cygwin",
773774
target_os = "freebsd",
774775
target_os = "fuchsia",
775-
target_os = "cygwin",
776776
))]
777777
#[inline]
778778
pub(crate) fn set_ip_recvtos(fd: BorrowedFd<'_>, value: bool) -> io::Result<()> {
@@ -782,9 +782,9 @@ pub(crate) fn set_ip_recvtos(fd: BorrowedFd<'_>, value: bool) -> io::Result<()>
782782
#[cfg(any(
783783
apple,
784784
linux_like,
785+
target_os = "cygwin",
785786
target_os = "freebsd",
786787
target_os = "fuchsia",
787-
target_os = "cygwin",
788788
))]
789789
#[inline]
790790
pub(crate) fn ip_recvtos(fd: BorrowedFd<'_>) -> io::Result<bool> {

src/net/sockopt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,9 @@ pub fn ip_tos<Fd: AsFd>(fd: Fd) -> io::Result<u8> {
10911091
#[cfg(any(
10921092
apple,
10931093
linux_like,
1094+
target_os = "cygwin",
10941095
target_os = "freebsd",
10951096
target_os = "fuchsia",
1096-
target_os = "cygwin",
10971097
))]
10981098
#[inline]
10991099
#[doc(alias = "IP_RECVTOS")]
@@ -1109,9 +1109,9 @@ pub fn set_ip_recvtos<Fd: AsFd>(fd: Fd, value: bool) -> io::Result<()> {
11091109
#[cfg(any(
11101110
apple,
11111111
linux_like,
1112+
target_os = "cygwin",
11121113
target_os = "freebsd",
11131114
target_os = "fuchsia",
1114-
target_os = "cygwin",
11151115
))]
11161116
#[inline]
11171117
#[doc(alias = "IP_RECVTOS")]

src/signal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,12 @@ impl Signal {
311311
bsd,
312312
solarish,
313313
target_os = "aix",
314+
target_os = "cygwin",
314315
target_os = "haiku",
315316
target_os = "horizon",
316317
target_os = "hurd",
317318
target_os = "nto",
318319
target_os = "vita",
319-
target_os = "cygwin",
320320
all(
321321
linux_kernel,
322322
any(

src/termios/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1565,10 +1565,10 @@ mod tests {
15651565
#[test]
15661566
#[cfg(not(any(
15671567
solarish,
1568+
target_os = "cygwin",
15681569
target_os = "emscripten",
15691570
target_os = "haiku",
15701571
target_os = "redox",
1571-
target_os = "cygwin",
15721572
)))]
15731573
fn termios_legacy() {
15741574
// Check that our doc aliases above are correct.

tests/net/sockopt.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,13 @@ fn test_sockopts_ipv4() {
314314
#[cfg(not(any(
315315
apple,
316316
windows,
317+
target_os = "cygwin",
317318
target_os = "dragonfly",
318319
target_os = "emscripten",
319320
target_os = "espidf",
320321
target_os = "haiku",
321322
target_os = "netbsd",
322323
target_os = "nto",
323-
target_os = "cygwin",
324324
)))]
325325
assert_eq!(sockopt::socket_domain(&s).unwrap(), AddressFamily::INET);
326326
assert_ne!(sockopt::ip_ttl(&s).unwrap(), 0);
@@ -369,9 +369,9 @@ fn test_sockopts_ipv4() {
369369
#[cfg(any(
370370
apple,
371371
linux_like,
372+
target_os = "cygwin",
372373
target_os = "freebsd",
373374
target_os = "fuchsia",
374-
target_os = "cygwin",
375375
))]
376376
{
377377
assert!(!sockopt::ip_recvtos(&s).unwrap());
@@ -410,13 +410,13 @@ fn test_sockopts_ipv6() {
410410
#[cfg(not(any(
411411
apple,
412412
windows,
413+
target_os = "cygwin",
413414
target_os = "dragonfly",
414415
target_os = "emscripten",
415416
target_os = "espidf",
416417
target_os = "haiku",
417418
target_os = "netbsd",
418419
target_os = "nto",
419-
target_os = "cygwin",
420420
)))]
421421
assert_eq!(sockopt::socket_domain(&s).unwrap(), AddressFamily::INET6);
422422

tests/process/wait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ fn test_waitpgid() {
9292
}
9393

9494
#[cfg(not(any(
95+
target_os = "cygwin",
9596
target_os = "emscripten",
9697
target_os = "openbsd",
9798
target_os = "redox",
9899
target_os = "wasi",
99-
target_os = "cygwin",
100100
)))]
101101
#[test]
102102
#[serial]

0 commit comments

Comments
 (0)