use is_empty() instead of len() == x to determine if structs are empty.
This commit is contained in:
parent
e2223c94bf
commit
9523c89f18
54 changed files with 78 additions and 82 deletions
|
@ -371,7 +371,7 @@ fn prepend_attrs(
|
|||
span: rustc_span::Span,
|
||||
) -> Option<tokenstream::TokenStream> {
|
||||
let tokens = tokens?;
|
||||
if attrs.len() == 0 {
|
||||
if attrs.is_empty() {
|
||||
return Some(tokens.clone());
|
||||
}
|
||||
let mut builder = tokenstream::TokenStreamBuilder::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue