diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-15 17:16:27 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-15 17:16:27 +0000 |
commit | a8587f153b5af6eda9917e11dbe92bd4ce4f4ac4 (patch) | |
tree | 7d4bfb07292d4f8f893cb09b3d5010a6e900b8fe /crates/assists | |
parent | 0c58aa9dc0e24f0fa6a6ee7eb0c35041dedddb0a (diff) | |
parent | 6dbba4d75d56728a95f84ee978eae3ac84016c73 (diff) |
Merge #7286
7286: Remove useless wrapper r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists')
-rw-r--r-- | crates/assists/src/assist_context.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/assists/src/assist_context.rs b/crates/assists/src/assist_context.rs index 321fe77f3..8d93edba2 100644 --- a/crates/assists/src/assist_context.rs +++ b/crates/assists/src/assist_context.rs | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | use std::mem; | 3 | use std::mem; |
4 | 4 | ||
5 | use algo::find_covering_element; | ||
6 | use hir::Semantics; | 5 | use hir::Semantics; |
7 | use ide_db::{ | 6 | use ide_db::{ |
8 | base_db::{AnchoredPathBuf, FileId, FileRange}, | 7 | base_db::{AnchoredPathBuf, FileId, FileRange}, |
@@ -94,11 +93,11 @@ impl<'a> AssistContext<'a> { | |||
94 | self.sema.find_node_at_offset_with_descend(self.source_file.syntax(), self.offset()) | 93 | self.sema.find_node_at_offset_with_descend(self.source_file.syntax(), self.offset()) |
95 | } | 94 | } |
96 | pub(crate) fn covering_element(&self) -> SyntaxElement { | 95 | pub(crate) fn covering_element(&self) -> SyntaxElement { |
97 | find_covering_element(self.source_file.syntax(), self.frange.range) | 96 | self.source_file.syntax().covering_element(self.frange.range) |
98 | } | 97 | } |
99 | // FIXME: remove | 98 | // FIXME: remove |
100 | pub(crate) fn covering_node_for_range(&self, range: TextRange) -> SyntaxElement { | 99 | pub(crate) fn covering_node_for_range(&self, range: TextRange) -> SyntaxElement { |
101 | find_covering_element(self.source_file.syntax(), range) | 100 | self.source_file.syntax().covering_element(range) |
102 | } | 101 | } |
103 | } | 102 | } |
104 | 103 | ||