mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Remove useless wrapper
This commit is contained in:
parent
d6a708b1ea
commit
6dbba4d75d
9 changed files with 20 additions and 28 deletions
|
@ -1,7 +1,7 @@
|
|||
use assists::utils::extract_trivial_expression;
|
||||
use itertools::Itertools;
|
||||
use syntax::{
|
||||
algo::{find_covering_element, non_trivia_sibling},
|
||||
algo::non_trivia_sibling,
|
||||
ast::{self, AstNode, AstToken},
|
||||
Direction, NodeOrToken, SourceFile,
|
||||
SyntaxKind::{self, USE_TREE, WHITESPACE},
|
||||
|
@ -31,7 +31,7 @@ pub(crate) fn join_lines(file: &SourceFile, range: TextRange) -> TextEdit {
|
|||
range
|
||||
};
|
||||
|
||||
let node = match find_covering_element(file.syntax(), range) {
|
||||
let node = match file.syntax().covering_element(range) {
|
||||
NodeOrToken::Node(node) => node,
|
||||
NodeOrToken::Token(token) => token.parent(),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue