mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Minor clippy performance suggestions
This commit is contained in:
parent
7c9ae771bc
commit
82d6cfd495
6 changed files with 7 additions and 7 deletions
|
@ -159,7 +159,7 @@ impl ast::AssocItemList {
|
|||
let whitespace =
|
||||
last_token_before_curly.clone().into_token().and_then(ast::Whitespace::cast)?;
|
||||
let text = whitespace.syntax().text();
|
||||
let newline = text.rfind("\n")?;
|
||||
let newline = text.rfind('\n')?;
|
||||
let keep = tokens::WsBuilder::new(&text[newline..]);
|
||||
Some(self.replace_children(
|
||||
first_token_after_items..=last_token_before_curly,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue