diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2022-10-26 17:40:41 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2022-10-26 17:40:41 +0300 |
| commit | 22a6bc4da0ce15606e3a7fb01c5cc6ff175f79af (patch) | |
| tree | 9832a32abb629ff63b4842c4ea706efd8740d750 /src/tools/rust-analyzer/crates/syntax | |
| parent | 43dd3d514b6b11c5195de2fd8e665828801d0972 (diff) | |
| parent | 43fb9563b2943d6abc5f3552195f3e27ac618966 (diff) | |
| download | rust-22a6bc4da0ce15606e3a7fb01c5cc6ff175f79af.tar.gz rust-22a6bc4da0ce15606e3a7fb01c5cc6ff175f79af.zip | |
:arrow_up: rust-analyzer
Diffstat (limited to 'src/tools/rust-analyzer/crates/syntax')
| -rw-r--r-- | src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs | 5 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/syntax/src/lib.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs index 229e7419b73..660c057e99c 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/edit_in_place.rs @@ -645,7 +645,7 @@ impl ast::RecordPatFieldList { } fn get_or_insert_comma_after(syntax: &SyntaxNode) -> SyntaxToken { - let comma = match syntax + match syntax .siblings_with_tokens(Direction::Next) .filter_map(|it| it.into_token()) .find(|it| it.kind() == T![,]) @@ -656,8 +656,7 @@ fn get_or_insert_comma_after(syntax: &SyntaxNode) -> SyntaxToken { ted::insert(Position::after(syntax), &comma); comma } - }; - comma + } } impl ast::StmtList { diff --git a/src/tools/rust-analyzer/crates/syntax/src/lib.rs b/src/tools/rust-analyzer/crates/syntax/src/lib.rs index 4f5e273a520..84c66b27e69 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/lib.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/lib.rs @@ -92,7 +92,7 @@ impl<T> Parse<T> { SyntaxNode::new_root(self.green.clone()) } pub fn errors(&self) -> &[SyntaxError] { - &*self.errors + &self.errors } } |
