mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: various clippy lints
This commit is contained in:
parent
900d6030e7
commit
d7fdf141a4
5 changed files with 10 additions and 14 deletions
|
@ -195,7 +195,7 @@ pub fn ty_alias(
|
|||
}
|
||||
}
|
||||
|
||||
s.push_str(";");
|
||||
s.push(';');
|
||||
ast_from_text(&s)
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ pub fn hacky_block_expr(
|
|||
format_to!(buf, " {t}\n")
|
||||
} else if kind == SyntaxKind::WHITESPACE {
|
||||
let content = t.text().trim_matches(|c| c != '\n');
|
||||
if content.len() >= 1 {
|
||||
if !content.is_empty() {
|
||||
format_to!(buf, "{}", &content[1..])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue