Skip to content

Commit

Permalink
Fix variant name interpolation in documentation for IsVariant
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha-tango-kilo committed May 19, 2024
1 parent c70cc34 commit 6b7ea1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
([#297](https://github.com/JelteF/derive_more/pull/297))
- Hygiene of macro expansions in presence of custom `core` crate.
([#327](https://github.com/JelteF/derive_more/pull/327))
- Fix documentation of generated methods in `IsVariant` derive.

## 0.99.10 - 2020-09-11

Expand Down
2 changes: 1 addition & 1 deletion impl/src/is_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
Fields::Unnamed(_) => quote! { (..) },
Fields::Unit => quote! {},
};
let variant_name = stringify!(variant_ident);
let variant_name = variant_ident.to_string();
let func = quote! {
#[doc = "Returns `true` if this value is of type `"]
#[doc = #variant_name]
Expand Down

0 comments on commit 6b7ea1e

Please sign in to comment.