Skip to content

Commit

Permalink
Fix typos & misspellings in docs (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
5-pebbles authored Mar 31, 2024
1 parent 8b781ba commit f5fce03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion strum/src/additional_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
//!
//! - `ascii_case_insensitive`: makes the comparison to this variant case insensitive (ASCII only).
//! If the whole enum is marked `ascii_case_insensitive`, you can specify `ascii_case_insensitive = false`
//! to disable case insensitivity on this v ariant.
//! to disable case insensitivity on this variant.
//!
//! - `message=".."`: Adds a message to enum variant. This is used in conjunction with the `EnumMessage`
//! trait to associate a message with a variant. If `detailed_message` is not provided,
Expand Down
6 changes: 3 additions & 3 deletions strum_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ pub fn enum_table(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
/// data. The discriminant follows the same rules as `rustc`. The first discriminant is zero and each
/// successive variant has a discriminant of one greater than the previous variant, except where an
/// explicit discriminant is specified. The type of the discriminant will match the `repr` type if
/// it is specifed.
/// it is specified.
///
/// When the macro is applied using rustc >= 1.46 and when there is no additional data on any of
/// the variants, the `from_repr` function is marked `const`. rustc >= 1.46 is required
Expand Down Expand Up @@ -668,7 +668,7 @@ pub fn from_repr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
///
/// Encode strings into the enum itself. The `strum_macros::EmumMessage` macro implements the `strum::EnumMessage` trait.
/// `EnumMessage` looks for `#[strum(message="...")]` attributes on your variants.
/// You can also provided a `detailed_message="..."` attribute to create a seperate more detailed message than the first.
/// You can also provided a `detailed_message="..."` attribute to create a separate more detailed message than the first.
///
/// `EnumMessage` also exposes the variants doc comments through `get_documentation()`. This is useful in some scenarios,
/// but `get_message` should generally be preferred. Rust doc comments are intended for developer facing documentation,
Expand Down Expand Up @@ -754,7 +754,7 @@ pub fn enum_messages(input: proc_macro::TokenStream) -> proc_macro::TokenStream

/// Add custom properties to enum variants.
///
/// Enables the encoding of arbitary constants into enum variants. This method
/// Enables the encoding of arbitrary constants into enum variants. This method
/// currently only supports adding additional string values. Other types of literals are still
/// experimental in the rustc compiler. The generated code works by nesting match statements.
/// The first match statement matches on the type of the enum, and the inner match statement
Expand Down

0 comments on commit f5fce03

Please sign in to comment.