aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/join_lines.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-09 15:41:25 +0100
committerAleksey Kladov <[email protected]>2021-05-09 15:47:02 +0100
commitedeb4927829380ed25e3899e85b2809bbb39a846 (patch)
tree6714a4956f928e2259ad4a946a8be615443f2b4b /crates/ide/src/join_lines.rs
parent5637ce4250247eef4c2ae1892cead69b6d6a172b (diff)
minor: fix test style
Diffstat (limited to 'crates/ide/src/join_lines.rs')
-rw-r--r--crates/ide/src/join_lines.rs12
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
68fn remove_newline(edit: &mut TextEditBuilder, token: &SyntaxToken, offset: TextSize) { 68fn 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'),