diff options
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/join_lines.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/ide/src/join_lines.rs b/crates/ide/src/join_lines.rs index 3e30e71ce..61dcbb399 100644 --- a/crates/ide/src/join_lines.rs +++ b/crates/ide/src/join_lines.rs | |||
@@ -67,18 +67,6 @@ fn remove_newlines(edit: &mut TextEditBuilder, token: &SyntaxToken, range: TextR | |||
67 | 67 | ||
68 | fn remove_newline(edit: &mut TextEditBuilder, token: &SyntaxToken, offset: TextSize) { | 68 | fn remove_newline(edit: &mut TextEditBuilder, token: &SyntaxToken, offset: TextSize) { |
69 | if token.kind() != WHITESPACE || token.text().bytes().filter(|&b| b == b'\n').count() != 1 { | 69 | if token.kind() != WHITESPACE || token.text().bytes().filter(|&b| b == b'\n').count() != 1 { |
70 | let mut no_space = false; | ||
71 | if let Some(string) = ast::String::cast(token.clone()) { | ||
72 | if let Some(range) = string.open_quote_text_range() { | ||
73 | cov_mark::hit!(join_string_literal_open_quote); | ||
74 | no_space |= range.end() == offset; | ||
75 | } | ||
76 | if let Some(range) = string.close_quote_text_range() { | ||
77 | cov_mark::hit!(join_string_literal_close_quote); | ||
78 | no_space |= range.start() == offset + TextSize::of('\n'); | ||
79 | } | ||
80 | } | ||
81 | |||
82 | let n_spaces_after_line_break = { | 70 | let n_spaces_after_line_break = { |
83 | let suff = &token.text()[TextRange::new( | 71 | let suff = &token.text()[TextRange::new( |
84 | offset - token.text_range().start() + TextSize::of('\n'), | 72 | offset - token.text_range().start() + TextSize::of('\n'), |