diff options
Diffstat (limited to 'crates/syntax')
-rw-r--r-- | crates/syntax/src/ast/edit.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 64fac13a7..80be8b79c 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs | |||
@@ -333,8 +333,7 @@ impl ast::Use { | |||
333 | .and_then(ast::Whitespace::cast); | 333 | .and_then(ast::Whitespace::cast); |
334 | if let Some(next_ws) = next_ws { | 334 | if let Some(next_ws) = next_ws { |
335 | let ws_text = next_ws.syntax().text(); | 335 | let ws_text = next_ws.syntax().text(); |
336 | if ws_text.starts_with('\n') { | 336 | if let Some(rest) = ws_text.strip_prefix('\n') { |
337 | let rest = &ws_text[1..]; | ||
338 | if rest.is_empty() { | 337 | if rest.is_empty() { |
339 | res.delete(next_ws.syntax()) | 338 | res.delete(next_ws.syntax()) |
340 | } else { | 339 | } else { |