From 6dbba4d75d56728a95f84ee978eae3ac84016c73 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 15 Jan 2021 20:15:33 +0300 Subject: Remove useless wrapper --- crates/assists/src/assist_context.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/assists') 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 @@ use std::mem; -use algo::find_covering_element; use hir::Semantics; use ide_db::{ base_db::{AnchoredPathBuf, FileId, FileRange}, @@ -94,11 +93,11 @@ impl<'a> AssistContext<'a> { self.sema.find_node_at_offset_with_descend(self.source_file.syntax(), self.offset()) } pub(crate) fn covering_element(&self) -> SyntaxElement { - find_covering_element(self.source_file.syntax(), self.frange.range) + self.source_file.syntax().covering_element(self.frange.range) } // FIXME: remove pub(crate) fn covering_node_for_range(&self, range: TextRange) -> SyntaxElement { - find_covering_element(self.source_file.syntax(), range) + self.source_file.syntax().covering_element(range) } } -- cgit v1.2.3