mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
.
This commit is contained in:
parent
63f509f492
commit
46b4f89c92
28 changed files with 69 additions and 67 deletions
|
@ -59,7 +59,7 @@ fn remove_newline(edit: &mut TextEditBuilder, token: &SyntaxToken, offset: TextS
|
|||
// The node is either the first or the last in the file
|
||||
let suff = &token.text()[TextRange::new(
|
||||
offset - token.text_range().start() + TextSize::of('\n'),
|
||||
TextSize::of(token.text().as_str()),
|
||||
TextSize::of(token.text()),
|
||||
)];
|
||||
let spaces = suff.bytes().take_while(|&b| b == b' ').count();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue