Skip to content

Commit ece6047

Browse files
committed
Clippy fixes.
1 parent c653eb6 commit ece6047

File tree

2 files changed

+45
-30
lines changed

2 files changed

+45
-30
lines changed

src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1+
#![cfg_attr(
2+
feature = "cargo-clippy",
3+
warn(
4+
clippy::float_arithmetic,
5+
clippy::mut_mut,
6+
clippy::nonminimal_bool,
7+
clippy::option_map_unwrap_or,
8+
clippy::option_map_unwrap_or_else,
9+
clippy::print_stdout,
10+
clippy::unicode_not_nfc,
11+
clippy::use_self
12+
)
13+
)]
14+
#![no_std]
15+
116
pub mod wasi_unstable;

src/wasi_unstable/raw.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -268,43 +268,43 @@ pub const __WASI_FILESTAT_SET_ATIM: u16 = 0x0001;
268268
pub const __WASI_FILESTAT_SET_ATIM_NOW: u16 = 0x0002;
269269
pub const __WASI_FILESTAT_SET_MTIM: u16 = 0x0004;
270270
pub const __WASI_FILESTAT_SET_MTIM_NOW: u16 = 0x0008;
271-
pub const __WASI_LOOKUP_SYMLINK_FOLLOW: u32 = 0x00000001;
271+
pub const __WASI_LOOKUP_SYMLINK_FOLLOW: u32 = 0x0000_0001;
272272
pub const __WASI_O_CREAT: u16 = 0x0001;
273273
pub const __WASI_O_DIRECTORY: u16 = 0x0002;
274274
pub const __WASI_O_EXCL: u16 = 0x0004;
275275
pub const __WASI_O_TRUNC: u16 = 0x0008;
276276
pub const __WASI_PREOPENTYPE_DIR: u8 = 0;
277277
pub const __WASI_SOCK_RECV_PEEK: u16 = 0x0001;
278278
pub const __WASI_SOCK_RECV_WAITALL: u16 = 0x0002;
279-
pub const __WASI_RIGHT_FD_DATASYNC: u64 = 0x0000000000000001;
280-
pub const __WASI_RIGHT_FD_READ: u64 = 0x0000000000000002;
281-
pub const __WASI_RIGHT_FD_SEEK: u64 = 0x0000000000000004;
282-
pub const __WASI_RIGHT_FD_FDSTAT_SET_FLAGS: u64 = 0x0000000000000008;
283-
pub const __WASI_RIGHT_FD_SYNC: u64 = 0x0000000000000010;
284-
pub const __WASI_RIGHT_FD_TELL: u64 = 0x0000000000000020;
285-
pub const __WASI_RIGHT_FD_WRITE: u64 = 0x0000000000000040;
286-
pub const __WASI_RIGHT_FD_ADVISE: u64 = 0x0000000000000080;
287-
pub const __WASI_RIGHT_FD_ALLOCATE: u64 = 0x0000000000000100;
288-
pub const __WASI_RIGHT_PATH_CREATE_DIRECTORY: u64 = 0x0000000000000200;
289-
pub const __WASI_RIGHT_PATH_CREATE_FILE: u64 = 0x0000000000000400;
290-
pub const __WASI_RIGHT_PATH_LINK_SOURCE: u64 = 0x0000000000000800;
291-
pub const __WASI_RIGHT_PATH_LINK_TARGET: u64 = 0x0000000000001000;
292-
pub const __WASI_RIGHT_PATH_OPEN: u64 = 0x0000000000002000;
293-
pub const __WASI_RIGHT_FD_READDIR: u64 = 0x0000000000004000;
294-
pub const __WASI_RIGHT_PATH_READLINK: u64 = 0x0000000000008000;
295-
pub const __WASI_RIGHT_PATH_RENAME_SOURCE: u64 = 0x0000000000010000;
296-
pub const __WASI_RIGHT_PATH_RENAME_TARGET: u64 = 0x0000000000020000;
297-
pub const __WASI_RIGHT_PATH_FILESTAT_GET: u64 = 0x0000000000040000;
298-
pub const __WASI_RIGHT_PATH_FILESTAT_SET_SIZE: u64 = 0x0000000000080000;
299-
pub const __WASI_RIGHT_PATH_FILESTAT_SET_TIMES: u64 = 0x0000000000100000;
300-
pub const __WASI_RIGHT_FD_FILESTAT_GET: u64 = 0x0000000000200000;
301-
pub const __WASI_RIGHT_FD_FILESTAT_SET_SIZE: u64 = 0x0000000000400000;
302-
pub const __WASI_RIGHT_FD_FILESTAT_SET_TIMES: u64 = 0x0000000000800000;
303-
pub const __WASI_RIGHT_PATH_SYMLINK: u64 = 0x0000000001000000;
304-
pub const __WASI_RIGHT_PATH_REMOVE_DIRECTORY: u64 = 0x0000000002000000;
305-
pub const __WASI_RIGHT_PATH_UNLINK_FILE: u64 = 0x0000000004000000;
306-
pub const __WASI_RIGHT_POLL_FD_READWRITE: u64 = 0x0000000008000000;
307-
pub const __WASI_RIGHT_SOCK_SHUTDOWN: u64 = 0x0000000010000000;
279+
pub const __WASI_RIGHT_FD_DATASYNC: u64 = 0x0000_0000_0000_0001;
280+
pub const __WASI_RIGHT_FD_READ: u64 = 0x0000_0000_0000_0002;
281+
pub const __WASI_RIGHT_FD_SEEK: u64 = 0x0000_0000_0000_0004;
282+
pub const __WASI_RIGHT_FD_FDSTAT_SET_FLAGS: u64 = 0x0000_0000_0000_0008;
283+
pub const __WASI_RIGHT_FD_SYNC: u64 = 0x0000_0000_0000_0010;
284+
pub const __WASI_RIGHT_FD_TELL: u64 = 0x0000_0000_0000_0020;
285+
pub const __WASI_RIGHT_FD_WRITE: u64 = 0x0000_0000_0000_0040;
286+
pub const __WASI_RIGHT_FD_ADVISE: u64 = 0x0000_0000_0000_0080;
287+
pub const __WASI_RIGHT_FD_ALLOCATE: u64 = 0x0000_0000_0000_0100;
288+
pub const __WASI_RIGHT_PATH_CREATE_DIRECTORY: u64 = 0x0000_0000_0000_0200;
289+
pub const __WASI_RIGHT_PATH_CREATE_FILE: u64 = 0x0000_0000_0000_0400;
290+
pub const __WASI_RIGHT_PATH_LINK_SOURCE: u64 = 0x0000_0000_0000_0800;
291+
pub const __WASI_RIGHT_PATH_LINK_TARGET: u64 = 0x0000_0000_0000_1000;
292+
pub const __WASI_RIGHT_PATH_OPEN: u64 = 0x0000_0000_0000_2000;
293+
pub const __WASI_RIGHT_FD_READDIR: u64 = 0x0000_0000_0000_4000;
294+
pub const __WASI_RIGHT_PATH_READLINK: u64 = 0x0000_0000_0000_8000;
295+
pub const __WASI_RIGHT_PATH_RENAME_SOURCE: u64 = 0x0000_0000_0001_0000;
296+
pub const __WASI_RIGHT_PATH_RENAME_TARGET: u64 = 0x0000_0000_0002_0000;
297+
pub const __WASI_RIGHT_PATH_FILESTAT_GET: u64 = 0x0000_0000_0004_0000;
298+
pub const __WASI_RIGHT_PATH_FILESTAT_SET_SIZE: u64 = 0x0000_0000_0008_0000;
299+
pub const __WASI_RIGHT_PATH_FILESTAT_SET_TIMES: u64 = 0x0000_0000_0010_0000;
300+
pub const __WASI_RIGHT_FD_FILESTAT_GET: u64 = 0x0000_0000_0020_0000;
301+
pub const __WASI_RIGHT_FD_FILESTAT_SET_SIZE: u64 = 0x0000_0000_0040_0000;
302+
pub const __WASI_RIGHT_FD_FILESTAT_SET_TIMES: u64 = 0x0000_0000_0080_0000;
303+
pub const __WASI_RIGHT_PATH_SYMLINK: u64 = 0x0000_0000_0100_0000;
304+
pub const __WASI_RIGHT_PATH_REMOVE_DIRECTORY: u64 = 0x0000_0000_0200_0000;
305+
pub const __WASI_RIGHT_PATH_UNLINK_FILE: u64 = 0x0000_0000_0400_0000;
306+
pub const __WASI_RIGHT_POLL_FD_READWRITE: u64 = 0x0000_0000_0800_0000;
307+
pub const __WASI_RIGHT_SOCK_SHUTDOWN: u64 = 0x0000_0000_1000_0000;
308308
pub const __WASI_SOCK_RECV_DATA_TRUNCATED: u16 = 0x0001;
309309
pub const __WASI_SHUT_RD: u8 = 0x01;
310310
pub const __WASI_SHUT_WR: u8 = 0x02;

0 commit comments

Comments
 (0)