Skip to content

Commit

Permalink
review: addresses near-cli-rs#26 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Feb 10, 2025
1 parent aad7bda commit 9bedd97
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ pub fn fn_choose_variant(
if attr.path.is_ident("strum_discriminants") {
for attr_token in attr.tokens.clone() {
if let proc_macro2::TokenTree::Group(group) = attr_token {
let group_stream_no_whitespace =
group.stream().to_string().replace(" ", "");
let group_stream_no_whitespace = group
.stream()
.to_string()
.split_whitespace()
.collect::<Vec<_>>()
.join("");
dbg_cond!(&group_stream_no_whitespace);
if &group_stream_no_whitespace == "derive(EnumMessage,EnumIter)" {
ast_attrs.push("strum_discriminants");
Expand Down

0 comments on commit 9bedd97

Please sign in to comment.