aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/join_lines.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-01-19 22:56:11 +0000
committerAleksey Kladov <[email protected]>2021-01-19 22:56:11 +0000
commit46b4f89c920c314caf1a8af2abdb09732d100d67 (patch)
tree1f01586d15be6fbcbcb6a40194ab6f1f723a36b7 /crates/ide/src/join_lines.rs
parent63f509f4924e7448b9131514bbdd7a4da5292cd1 (diff)
.
Diffstat (limited to 'crates/ide/src/join_lines.rs')
-rw-r--r--crates/ide/src/join_lines.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/join_lines.rs b/crates/ide/src/join_lines.rs
index 981467c8d..631bde0f1 100644
--- a/crates/ide/src/join_lines.rs
+++ b/crates/ide/src/join_lines.rs
@@ -59,7 +59,7 @@ fn remove_newline(edit: &mut TextEditBuilder, token: &SyntaxToken, offset: TextS
59 // The node is either the first or the last in the file 59 // The node is either the first or the last in the file
60 let suff = &token.text()[TextRange::new( 60 let suff = &token.text()[TextRange::new(
61 offset - token.text_range().start() + TextSize::of('\n'), 61 offset - token.text_range().start() + TextSize::of('\n'),
62 TextSize::of(token.text().as_str()), 62 TextSize::of(token.text()),
63 )]; 63 )];
64 let spaces = suff.bytes().take_while(|&b| b == b' ').count(); 64 let spaces = suff.bytes().take_while(|&b| b == b' ').count();
65 65