From c3459c54cee8534da175cfa07ac30bde6b2ba211 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Mon, 12 Feb 2024 11:35:22 +0100 Subject: [PATCH] Mark `format::Numeric` and `format::Fixed` as `non_exhaustive` --- src/format/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/format/mod.rs b/src/format/mod.rs index a822882786..75bc02ee31 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -97,6 +97,7 @@ pub enum Pad { /// It also trims the preceding whitespace if any. /// It cannot parse the negative number, so some date and time cannot be formatted then /// parsed with the same formatting items. +#[non_exhaustive] #[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Numeric { /// Full Gregorian year (FW=4, PW=∞). @@ -168,6 +169,7 @@ impl fmt::Debug for InternalNumeric { /// /// They have their own rules of formatting and parsing. /// Otherwise noted, they print in the specified cases but parse case-insensitively. +#[non_exhaustive] #[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum Fixed { /// Abbreviated month names.