Skip to content

Commit 8a7b02c

Browse files
authored
Merge pull request #1647 from vickenty/osx
Fix CI
2 parents 74ff412 + 40f80c6 commit 8a7b02c

File tree

19 files changed

+187
-176
lines changed

19 files changed

+187
-176
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ task:
1515
task:
1616
name: stable x86_64-unknown-freebsd-11
1717
freebsd_instance:
18-
image: freebsd-11-3-stable-amd64-v20190801
18+
image: freebsd-11-3-stable-amd64-v20200213
1919
setup_script:
2020
- pkg install -y curl
2121
- curl https://sh.rustup.rs -sSf --output rustup.sh

ci/azure-install-rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ steps:
4545
- bash: |
4646
set -ex
4747
gcc -print-search-dirs
48-
find "C:\ProgramData\Chocolatey" -name "crt2*"
49-
find "C:\ProgramData\Chocolatey" -name "dllcrt2*"
50-
find "C:\ProgramData\Chocolatey" -name "libmsvcrt*"
48+
/usr/bin/find "C:\ProgramData\Chocolatey" -name "crt2*"
49+
/usr/bin/find "C:\ProgramData\Chocolatey" -name "dllcrt2*"
50+
/usr/bin/find "C:\ProgramData\Chocolatey" -name "libmsvcrt*"
5151
condition: eq( variables['Agent.OS'], 'Windows_NT' )
5252
displayName: Find GCC libraries (windows)
5353
- bash: |

ci/azure.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,6 @@ jobs:
9999
x86_64-apple-darwin:
100100
TARGET: x86_64-apple-darwin
101101

102-
- job: DockerOSX32
103-
pool:
104-
vmImage: macos-10.13
105-
steps:
106-
- template: azure-install-rust.yml
107-
- bash: LIBC_CI=1 sh ./ci/run.sh $TARGET
108-
displayName: Execute run.sh
109-
strategy:
110-
matrix:
111-
i686-apple-darwin:
112-
TARGET: i686-apple-darwin
113-
114102
- job: Windows
115103
pool:
116104
vmImage: vs2017-win2016

ci/build.sh

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,15 @@ x86_64-unknown-linux-gnux32 \
147147

148148
RUST_OSX_TARGETS="\
149149
aarch64-apple-ios \
150+
x86_64-apple-darwin \
151+
x86_64-apple-ios \
152+
"
153+
154+
RUST_LT_1_42_OSX_TARGETS="\
150155
armv7-apple-ios \
151156
armv7s-apple-ios \
152157
i386-apple-ios \
153158
i686-apple-darwin \
154-
x86_64-apple-darwin \
155-
x86_64-apple-ios \
156159
"
157160

158161
# The targets are listed here alphabetically
@@ -178,6 +181,12 @@ case "${OS}" in
178181
;;
179182
osx*)
180183
TARGETS="${RUST_OSX_TARGETS}"
184+
185+
if [ "${RUST}" != "nightly" ]; then
186+
if [ "${RUST}" != "beta" ]; then
187+
TARGETS="${TARGETS} ${RUST_LT_1_42_OSX_TARGETS}"
188+
fi
189+
fi
181190
;;
182191
*)
183192
;;
@@ -270,3 +279,17 @@ if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
270279
cargo xbuild --target switch.json
271280
fi
272281

282+
RUST_OSX_NO_CORE_TARGETS="\
283+
armv7-apple-ios \
284+
armv7s-apple-ios \
285+
i386-apple-ios \
286+
i686-apple-darwin \
287+
"
288+
289+
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "osx" ]; then
290+
for TARGET in $RUST_OSX_NO_CORE_TARGETS; do
291+
if echo "$TARGET" | grep -q "$FILTER"; then
292+
test_target xbuild "$TARGET" 1
293+
fi
294+
done
295+
fi

libc-test/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ fn test_openbsd(target: &str) {
389389

390390
cfg.skip_field_type(move |struct_, field| {
391391
// type siginfo_t.si_addr changed from OpenBSD 6.0 to 6.1
392-
(struct_ == "siginfo_t" && field == "si_addr")
392+
struct_ == "siginfo_t" && field == "si_addr"
393393
});
394394

395395
cfg.generate("../src/lib.rs", "main.rs");

src/fuchsia/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,12 +1509,12 @@ pub const LC_COLLATE: ::c_int = 3;
15091509
pub const LC_MONETARY: ::c_int = 4;
15101510
pub const LC_MESSAGES: ::c_int = 5;
15111511
pub const LC_ALL: ::c_int = 6;
1512-
pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
1513-
pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
1514-
pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
1515-
pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
1516-
pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
1517-
pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
1512+
pub const LC_CTYPE_MASK: ::c_int = 1 << LC_CTYPE;
1513+
pub const LC_NUMERIC_MASK: ::c_int = 1 << LC_NUMERIC;
1514+
pub const LC_TIME_MASK: ::c_int = 1 << LC_TIME;
1515+
pub const LC_COLLATE_MASK: ::c_int = 1 << LC_COLLATE;
1516+
pub const LC_MONETARY_MASK: ::c_int = 1 << LC_MONETARY;
1517+
pub const LC_MESSAGES_MASK: ::c_int = 1 << LC_MESSAGES;
15181518
// LC_ALL_MASK defined per platform
15191519

15201520
pub const MAP_FILE: ::c_int = 0x0000;
@@ -2691,7 +2691,7 @@ pub const FOPEN_MAX: ::c_uint = 1000;
26912691
pub const O_PATH: ::c_int = 0x00400000;
26922692
pub const O_EXEC: ::c_int = O_PATH;
26932693
pub const O_SEARCH: ::c_int = O_PATH;
2694-
pub const O_ACCMODE: ::c_int = (03 | O_SEARCH);
2694+
pub const O_ACCMODE: ::c_int = 03 | O_SEARCH;
26952695
pub const O_NDELAY: ::c_int = O_NONBLOCK;
26962696
pub const NI_MAXHOST: ::socklen_t = 255;
26972697
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
@@ -2893,7 +2893,7 @@ pub const O_CREAT: ::c_int = 0x00010000;
28932893
pub const O_EXCL: ::c_int = 0x00020000;
28942894
pub const O_NOCTTY: ::c_int = 0x00000200;
28952895
pub const O_NONBLOCK: ::c_int = 0x00000010;
2896-
pub const O_SYNC: ::c_int = (0x00000040 | O_DSYNC);
2896+
pub const O_SYNC: ::c_int = 0x00000040 | O_DSYNC;
28972897
pub const O_RSYNC: ::c_int = O_SYNC;
28982898
pub const O_DSYNC: ::c_int = 0x00000020;
28992899

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,12 +1239,12 @@ pub const ACCOUNTING: ::c_short = 9;
12391239
pub const SIGNATURE: ::c_short = 10;
12401240
pub const SHUTDOWN_TIME: ::c_short = 11;
12411241

1242-
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
1243-
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
1244-
pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
1245-
pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
1246-
pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
1247-
pub const LC_TIME_MASK: ::c_int = (1 << 5);
1242+
pub const LC_COLLATE_MASK: ::c_int = 1 << 0;
1243+
pub const LC_CTYPE_MASK: ::c_int = 1 << 1;
1244+
pub const LC_MESSAGES_MASK: ::c_int = 1 << 2;
1245+
pub const LC_MONETARY_MASK: ::c_int = 1 << 3;
1246+
pub const LC_NUMERIC_MASK: ::c_int = 1 << 4;
1247+
pub const LC_TIME_MASK: ::c_int = 1 << 5;
12481248
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
12491249
| LC_CTYPE_MASK
12501250
| LC_MESSAGES_MASK

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -956,12 +956,12 @@ pub const UTX_DB_UTMPX: ::c_uint = 0;
956956
pub const UTX_DB_WTMPX: ::c_uint = 1;
957957
pub const UTX_DB_LASTLOG: ::c_uint = 2;
958958

959-
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
960-
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
961-
pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
962-
pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
963-
pub const LC_TIME_MASK: ::c_int = (1 << 4);
964-
pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
959+
pub const LC_COLLATE_MASK: ::c_int = 1 << 0;
960+
pub const LC_CTYPE_MASK: ::c_int = 1 << 1;
961+
pub const LC_MONETARY_MASK: ::c_int = 1 << 2;
962+
pub const LC_NUMERIC_MASK: ::c_int = 1 << 3;
963+
pub const LC_TIME_MASK: ::c_int = 1 << 4;
964+
pub const LC_MESSAGES_MASK: ::c_int = 1 << 5;
965965
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
966966
| LC_CTYPE_MASK
967967
| LC_MESSAGES_MASK

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,12 +1024,12 @@ pub const UTXDB_ACTIVE: ::c_int = 0;
10241024
pub const UTXDB_LASTLOGIN: ::c_int = 1;
10251025
pub const UTXDB_LOG: ::c_int = 2;
10261026

1027-
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
1028-
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
1029-
pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
1030-
pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
1031-
pub const LC_TIME_MASK: ::c_int = (1 << 4);
1032-
pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
1027+
pub const LC_COLLATE_MASK: ::c_int = 1 << 0;
1028+
pub const LC_CTYPE_MASK: ::c_int = 1 << 1;
1029+
pub const LC_MONETARY_MASK: ::c_int = 1 << 2;
1030+
pub const LC_NUMERIC_MASK: ::c_int = 1 << 3;
1031+
pub const LC_TIME_MASK: ::c_int = 1 << 4;
1032+
pub const LC_MESSAGES_MASK: ::c_int = 1 << 5;
10331033
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
10341034
| LC_CTYPE_MASK
10351035
| LC_MESSAGES_MASK

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,12 @@ pub const AT_REMOVEDIR: ::c_int = 0x800;
865865
pub const EXTATTR_NAMESPACE_USER: ::c_int = 1;
866866
pub const EXTATTR_NAMESPACE_SYSTEM: ::c_int = 2;
867867

868-
pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
869-
pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
870-
pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
871-
pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
872-
pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
873-
pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
868+
pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE;
869+
pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE;
870+
pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY;
871+
pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC;
872+
pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME;
873+
pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES;
874874
pub const LC_ALL_MASK: ::c_int = !0;
875875

876876
pub const ERA: ::nl_item = 52;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,8 +1315,8 @@ pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
13151315
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
13161316
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
13171317

1318-
pub const PTHREAD_STACK_MIN: ::size_t = (1_usize << _MAX_PAGE_SHIFT);
1319-
pub const MINSIGSTKSZ: ::size_t = (3_usize << _MAX_PAGE_SHIFT);
1318+
pub const PTHREAD_STACK_MIN: ::size_t = 1_usize << _MAX_PAGE_SHIFT;
1319+
pub const MINSIGSTKSZ: ::size_t = 3_usize << _MAX_PAGE_SHIFT;
13201320
pub const SIGSTKSZ: ::size_t = MINSIGSTKSZ + (1_usize << _MAX_PAGE_SHIFT) * 4;
13211321

13221322
pub const PT_FIRSTMACH: ::c_int = 32;

src/unix/haiku/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ f! {
12381238
}
12391239

12401240
pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
1241-
(status & 0xff)
1241+
status & 0xff
12421242
}
12431243

12441244
pub fn WIFSIGNALED(status: ::c_int) -> bool {

src/unix/linux_like/android/mod.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -831,12 +831,12 @@ pub const LC_ADDRESS: ::c_int = 9;
831831
pub const LC_TELEPHONE: ::c_int = 10;
832832
pub const LC_MEASUREMENT: ::c_int = 11;
833833
pub const LC_IDENTIFICATION: ::c_int = 12;
834-
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
835-
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
836-
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
837-
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
838-
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
839-
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
834+
pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER;
835+
pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME;
836+
pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS;
837+
pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE;
838+
pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT;
839+
pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION;
840840
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
841841
| ::LC_NUMERIC_MASK
842842
| ::LC_TIME_MASK
@@ -1695,12 +1695,12 @@ pub const NFT_CMP_GTE: ::c_int = 5;
16951695
pub const NFT_RANGE_EQ: ::c_int = 0;
16961696
pub const NFT_RANGE_NEQ: ::c_int = 1;
16971697

1698-
pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
1698+
pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0;
16991699

17001700
pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
17011701
pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
17021702

1703-
pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
1703+
pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0;
17041704

17051705
pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
17061706
pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
@@ -1755,13 +1755,13 @@ pub const NFT_CT_BYTES: ::c_int = 15;
17551755
pub const NFT_LIMIT_PKTS: ::c_int = 0;
17561756
pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
17571757

1758-
pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
1758+
pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0;
17591759

17601760
pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
17611761
pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
17621762
pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
17631763

1764-
pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
1764+
pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0;
17651765

17661766
pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
17671767
pub const NFT_REJECT_TCP_RST: ::c_int = 1;
@@ -1953,11 +1953,11 @@ pub const IN_MODIFY: u32 = 0x0000_0002;
19531953
pub const IN_ATTRIB: u32 = 0x0000_0004;
19541954
pub const IN_CLOSE_WRITE: u32 = 0x0000_0008;
19551955
pub const IN_CLOSE_NOWRITE: u32 = 0x0000_0010;
1956-
pub const IN_CLOSE: u32 = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE);
1956+
pub const IN_CLOSE: u32 = IN_CLOSE_WRITE | IN_CLOSE_NOWRITE;
19571957
pub const IN_OPEN: u32 = 0x0000_0020;
19581958
pub const IN_MOVED_FROM: u32 = 0x0000_0040;
19591959
pub const IN_MOVED_TO: u32 = 0x0000_0080;
1960-
pub const IN_MOVE: u32 = (IN_MOVED_FROM | IN_MOVED_TO);
1960+
pub const IN_MOVE: u32 = IN_MOVED_FROM | IN_MOVED_TO;
19611961
pub const IN_CREATE: u32 = 0x0000_0100;
19621962
pub const IN_DELETE: u32 = 0x0000_0200;
19631963
pub const IN_DELETE_SELF: u32 = 0x0000_0400;
@@ -1974,7 +1974,7 @@ pub const IN_DONT_FOLLOW: u32 = 0x0200_0000;
19741974
pub const IN_ISDIR: u32 = 0x4000_0000;
19751975
pub const IN_ONESHOT: u32 = 0x8000_0000;
19761976

1977-
pub const IN_ALL_EVENTS: u32 = (IN_ACCESS
1977+
pub const IN_ALL_EVENTS: u32 = IN_ACCESS
19781978
| IN_MODIFY
19791979
| IN_ATTRIB
19801980
| IN_CLOSE_WRITE
@@ -1985,7 +1985,7 @@ pub const IN_ALL_EVENTS: u32 = (IN_ACCESS
19851985
| IN_DELETE
19861986
| IN_CREATE
19871987
| IN_DELETE_SELF
1988-
| IN_MOVE_SELF);
1988+
| IN_MOVE_SELF;
19891989

19901990
pub const IN_CLOEXEC: ::c_int = O_CLOEXEC;
19911991
pub const IN_NONBLOCK: ::c_int = O_NONBLOCK;

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ pub const LC_ADDRESS: ::c_int = 9;
372372
pub const LC_TELEPHONE: ::c_int = 10;
373373
pub const LC_MEASUREMENT: ::c_int = 11;
374374
pub const LC_IDENTIFICATION: ::c_int = 12;
375-
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
376-
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
377-
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
378-
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
379-
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
380-
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
375+
pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER;
376+
pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME;
377+
pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS;
378+
pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE;
379+
pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT;
380+
pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION;
381381
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
382382
| ::LC_NUMERIC_MASK
383383
| ::LC_TIME_MASK
@@ -747,12 +747,12 @@ pub const NFT_CMP_GTE: ::c_int = 5;
747747
pub const NFT_RANGE_EQ: ::c_int = 0;
748748
pub const NFT_RANGE_NEQ: ::c_int = 1;
749749

750-
pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
750+
pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0;
751751

752752
pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
753753
pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
754754

755-
pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
755+
pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0;
756756

757757
pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
758758
pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
@@ -807,13 +807,13 @@ pub const NFT_CT_BYTES: ::c_int = 15;
807807
pub const NFT_LIMIT_PKTS: ::c_int = 0;
808808
pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
809809

810-
pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
810+
pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0;
811811

812812
pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
813813
pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
814814
pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
815815

816-
pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
816+
pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0;
817817

818818
pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
819819
pub const NFT_REJECT_TCP_RST: ::c_int = 1;

src/unix/linux_like/linux/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,11 +2248,11 @@ pub const IN_MODIFY: u32 = 0x0000_0002;
22482248
pub const IN_ATTRIB: u32 = 0x0000_0004;
22492249
pub const IN_CLOSE_WRITE: u32 = 0x0000_0008;
22502250
pub const IN_CLOSE_NOWRITE: u32 = 0x0000_0010;
2251-
pub const IN_CLOSE: u32 = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE);
2251+
pub const IN_CLOSE: u32 = IN_CLOSE_WRITE | IN_CLOSE_NOWRITE;
22522252
pub const IN_OPEN: u32 = 0x0000_0020;
22532253
pub const IN_MOVED_FROM: u32 = 0x0000_0040;
22542254
pub const IN_MOVED_TO: u32 = 0x0000_0080;
2255-
pub const IN_MOVE: u32 = (IN_MOVED_FROM | IN_MOVED_TO);
2255+
pub const IN_MOVE: u32 = IN_MOVED_FROM | IN_MOVED_TO;
22562256
pub const IN_CREATE: u32 = 0x0000_0100;
22572257
pub const IN_DELETE: u32 = 0x0000_0200;
22582258
pub const IN_DELETE_SELF: u32 = 0x0000_0400;
@@ -2269,7 +2269,7 @@ pub const IN_DONT_FOLLOW: u32 = 0x0200_0000;
22692269
pub const IN_ISDIR: u32 = 0x4000_0000;
22702270
pub const IN_ONESHOT: u32 = 0x8000_0000;
22712271

2272-
pub const IN_ALL_EVENTS: u32 = (IN_ACCESS
2272+
pub const IN_ALL_EVENTS: u32 = IN_ACCESS
22732273
| IN_MODIFY
22742274
| IN_ATTRIB
22752275
| IN_CLOSE_WRITE
@@ -2280,7 +2280,7 @@ pub const IN_ALL_EVENTS: u32 = (IN_ACCESS
22802280
| IN_DELETE
22812281
| IN_CREATE
22822282
| IN_DELETE_SELF
2283-
| IN_MOVE_SELF);
2283+
| IN_MOVE_SELF;
22842284

22852285
pub const IN_CLOEXEC: ::c_int = O_CLOEXEC;
22862286
pub const IN_NONBLOCK: ::c_int = O_NONBLOCK;

0 commit comments

Comments
 (0)