mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-27 11:26:31 +00:00
Update ALL_KNOWN newtype_enum doccomment, make is_known const
This commit is contained in:
parent
2cb8db61f5
commit
9c4679fb88
1 changed files with 2 additions and 2 deletions
|
@ -76,14 +76,14 @@ macro_rules! newtype_enum {
|
||||||
|
|
||||||
impl $name {
|
impl $name {
|
||||||
arr!{
|
arr!{
|
||||||
#[doc = "Array containing all variants, ordered by their id value."]
|
#[doc = "Array containing all known variants."]
|
||||||
pub const ALL_KNOWN: [Self; _] = [
|
pub const ALL_KNOWN: [Self; _] = [
|
||||||
$( Self::$var_name, )*
|
$( Self::$var_name, )*
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc = "If this is one of the known variants."]
|
#[doc = "If this is one of the known variants."]
|
||||||
$v fn is_known(self) -> bool {
|
$v const fn is_known(self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
$(
|
$(
|
||||||
Self::$var_name => true,
|
Self::$var_name => true,
|
||||||
|
|
Loading…
Reference in a new issue