Skip to content

Commit

Permalink
Fix docs that say array instead of slice (#343)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Glotfelty <[email protected]>
  • Loading branch information
Peternator7 and Peter Glotfelty authored Mar 10, 2024
1 parent 07ba252 commit 1abb289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strum_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]`.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1abb289

Please sign in to comment.