diff options
Diffstat (limited to 'crates/syntax/src')
| -rw-r--r-- | crates/syntax/src/ast/edit_in_place.rs | 5 | ||||
| -rw-r--r-- | crates/syntax/src/lib.rs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs index 229e7419b73..660c057e99c 100644 --- a/crates/syntax/src/ast/edit_in_place.rs +++ b/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/crates/syntax/src/lib.rs b/crates/syntax/src/lib.rs index 4f5e273a520..84c66b27e69 100644 --- a/crates/syntax/src/lib.rs +++ b/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 } } |
