Skip to content

Commit

Permalink
Fix if condition that inspects the name of a check
Browse files Browse the repository at this point in the history
Unless specified by the user, the name of the check takes upon the value of `"<fn>"`, which is a string that is never empty.
  • Loading branch information
arqunis committed Sep 3, 2020
1 parent c8dacf2 commit 7d8c806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command_attr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ pub fn check(_attr: TokenStream, input: TokenStream) -> TokenStream {
let n = fun.name.clone();
let n2 = name.clone();
let visibility = fun.visibility;
let name = if name.is_empty() {
let name = if name == "<fn>" {
fun.name.clone()
} else {
Ident::new(&name, Span::call_site())
Expand Down

0 comments on commit 7d8c806

Please sign in to comment.