summaryrefslogtreecommitdiff
path: root/src/sys/quota.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/quota.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/quota.rs')
-rw-r--r--src/sys/quota.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sys/quota.rs b/src/sys/quota.rs
index 19330132..6e34e38d 100644
--- a/src/sys/quota.rs
+++ b/src/sys/quota.rs
@@ -42,6 +42,7 @@ libc_enum!{
libc_enum!{
/// The scope of the quota.
#[repr(i32)]
+ #[non_exhaustive]
pub enum QuotaType {
/// Specify a user quota
USRQUOTA,
@@ -53,6 +54,7 @@ libc_enum!{
libc_enum!{
/// The type of quota format to use.
#[repr(i32)]
+ #[non_exhaustive]
pub enum QuotaFmt {
/// Use the original quota format.
QFMT_VFS_OLD,