From 1abb289ebc3e3711a9b2215ee929ba94fba15d68 Mon Sep 17 00:00:00 2001 From: Peter Glotfelty Date: Sun, 10 Mar 2024 14:21:00 -0700 Subject: [PATCH] Fix docs that say array instead of slice (#343) Co-authored-by: Peter Glotfelty --- strum_macros/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strum_macros/src/lib.rs b/strum_macros/src/lib.rs index c653d4a3..209eb21d 100644 --- a/strum_macros/src/lib.rs +++ b/strum_macros/src/lib.rs @@ -178,7 +178,7 @@ pub fn as_ref_str(input: proc_macro::TokenStream) -> proc_macro::TokenStream { toks.into() } -/// Implements `Strum::VariantNames` which adds an associated constant `VARIANTS` which is an array of discriminant names. +/// Implements `Strum::VariantNames` which adds an associated constant `VARIANTS` which is a `'static` slice of discriminant names. /// /// Adds an `impl` block for the `enum` that adds a static `VARIANTS` array of `&'static str` that are the discriminant names. /// This will respect the `serialize_all` attribute on the `enum` (like `#[strum(serialize_all = "snake_case")]`. @@ -224,7 +224,7 @@ pub fn variant_names_deprecated(input: proc_macro::TokenStream) -> proc_macro::T toks.into() } -/// Adds a static array with all of the Enum's variants. +/// Adds a `'static` slice with all of the Enum's variants. /// /// Implements `strum::VariantArray` which adds an associated constant `VARIANTS`. /// This constant contains an array with all the variants of the enumerator.