diff options
author | Aleksey Kladov <[email protected]> | 2020-05-07 16:32:01 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-07 16:32:01 +0100 |
commit | 1e790ea3149f085e49cb66e6a052920f72da01e9 (patch) | |
tree | 0a036aeb11785ab638c809614daa66e5dd1133b4 /crates/ra_assists/src/assist_context.rs | |
parent | 28fcff125a73ab2fc4aeaa100fc472af5178db20 (diff) |
Simplify
Diffstat (limited to 'crates/ra_assists/src/assist_context.rs')
-rw-r--r-- | crates/ra_assists/src/assist_context.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assist_context.rs b/crates/ra_assists/src/assist_context.rs index 81052ab49..3085c4330 100644 --- a/crates/ra_assists/src/assist_context.rs +++ b/crates/ra_assists/src/assist_context.rs | |||
@@ -76,8 +76,7 @@ impl<'a> AssistContext<'a> { | |||
76 | find_node_at_offset(self.source_file.syntax(), self.offset()) | 76 | find_node_at_offset(self.source_file.syntax(), self.offset()) |
77 | } | 77 | } |
78 | pub(crate) fn find_node_at_offset_with_descend<N: AstNode>(&self) -> Option<N> { | 78 | pub(crate) fn find_node_at_offset_with_descend<N: AstNode>(&self) -> Option<N> { |
79 | self.sema | 79 | self.sema.find_node_at_offset_with_descend(self.source_file.syntax(), self.offset()) |
80 | .find_node_at_offset_with_descend(self.source_file.syntax(), self.frange.range.start()) | ||
81 | } | 80 | } |
82 | pub(crate) fn covering_element(&self) -> SyntaxElement { | 81 | pub(crate) fn covering_element(&self) -> SyntaxElement { |
83 | find_covering_element(self.source_file.syntax(), self.frange.range) | 82 | find_covering_element(self.source_file.syntax(), self.frange.range) |