aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-02 09:07:42 +0100
committerGitHub <[email protected]>2020-10-02 09:07:42 +0100
commite535489f03901ab94a89dd2de67f35714f0c3cfc (patch)
treef3e70f9a42b29d3d01448cc298dc61a0bce04294 /crates/syntax
parentc3bf7659b13a14541ddcff9c243c79b45bfd6829 (diff)
parent82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f (diff)
Merge #6104
6104: Minor clippy performance suggestions r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/syntax')
-rw-r--r--crates/syntax/src/ast/edit.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs
index dda0a0319..77233ab31 100644
--- a/crates/syntax/src/ast/edit.rs
+++ b/crates/syntax/src/ast/edit.rs
@@ -159,7 +159,7 @@ impl ast::AssocItemList {
159 let whitespace = 159 let whitespace =
160 last_token_before_curly.clone().into_token().and_then(ast::Whitespace::cast)?; 160 last_token_before_curly.clone().into_token().and_then(ast::Whitespace::cast)?;
161 let text = whitespace.syntax().text(); 161 let text = whitespace.syntax().text();
162 let newline = text.rfind("\n")?; 162 let newline = text.rfind('\n')?;
163 let keep = tokens::WsBuilder::new(&text[newline..]); 163 let keep = tokens::WsBuilder::new(&text[newline..]);
164 Some(self.replace_children( 164 Some(self.replace_children(
165 first_token_after_items..=last_token_before_curly, 165 first_token_after_items..=last_token_before_curly,