Skip to content

Commit

Permalink
fix: remove async test if condition not match
Browse files Browse the repository at this point in the history
  • Loading branch information
fMeow committed May 28, 2021
1 parent 47c5cab commit 0c49246
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,10 @@ pub fn test(args: TokenStream, input: TokenStream) -> TokenStream {
let async_cond =
match_nested_meta_to_str_lit!(list.nested.first().unwrap());
let async_test = match_nested_meta_to_str_lit!(list.nested.last().unwrap());
let attr = quote!( #[cfg_attr(#async_cond, maybe_async::must_be_async, #async_test)] );
let attr = quote!(
#[cfg(#async_cond)]
#[cfg_attr(#async_cond, maybe_async::must_be_async, #async_test)]
);
async_token.push(attr);
} else {
let msg = format!(
Expand Down

0 comments on commit 0c49246

Please sign in to comment.