summaryrefslogtreecommitdiff
path: root/src/sys/aio.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-07-24 14:43:02 -0600
committerAlan Somers <asomers@gmail.com>2021-07-24 14:44:11 -0600
commit358adafa279ff3e6898ed49f4a2140144f121e9c (patch)
treed58fefacd019389f5131ea6a3c11b502fdcee276 /src/sys/aio.rs
parent7033d470d000a35236f157258c13dd50bc64725a (diff)
downloadnix-358adafa279ff3e6898ed49f4a2140144f121e9c.zip
Mark most C-derived enums as non_exhaustive
Since libc may add new variants at any time, Nix's consumers should not use exhaustive match patterns. Fixes #1182
Diffstat (limited to 'src/sys/aio.rs')
-rw-r--r--src/sys/aio.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sys/aio.rs b/src/sys/aio.rs
index b63affb8..71a2184d 100644
--- a/src/sys/aio.rs
+++ b/src/sys/aio.rs
@@ -39,6 +39,7 @@ libc_enum! {
/// Mode for `AioCb::fsync`. Controls whether only data or both data and
/// metadata are synced.
#[repr(i32)]
+ #[non_exhaustive]
pub enum AioFsyncMode {
/// do it like `fsync`
O_SYNC,
@@ -57,6 +58,7 @@ libc_enum! {
/// given `aiocb` should be used for a read operation, a write operation, or
/// ignored. Has no effect for any other aio functions.
#[repr(i32)]
+ #[non_exhaustive]
pub enum LioOpcode {
LIO_NOP,
LIO_WRITE,