Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/make.rs')
| -rw-r--r-- | crates/syntax/src/ast/make.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index cc0d7f4b48..8d2dc8709b 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -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..]) } } |