From 9c4679fb88a7e0a7a791ba22a25dffde3564e060 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Wed, 30 Jun 2021 20:09:24 -0700 Subject: [PATCH] Update ALL_KNOWN newtype_enum doccomment, make is_known const --- src/consts/macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/consts/macros.rs b/src/consts/macros.rs index 550dbf8..14f7892 100644 --- a/src/consts/macros.rs +++ b/src/consts/macros.rs @@ -76,14 +76,14 @@ macro_rules! newtype_enum { impl $name { arr!{ - #[doc = "Array containing all variants, ordered by their id value."] + #[doc = "Array containing all known variants."] pub const ALL_KNOWN: [Self; _] = [ $( Self::$var_name, )* ] } #[doc = "If this is one of the known variants."] - $v fn is_known(self) -> bool { + $v const fn is_known(self) -> bool { match self { $( Self::$var_name => true,