From 0aece75cdd40daa4d48484103cfcd36ba13ba076 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Apr 2020 19:25:33 +0200 Subject: Remove dead code --- crates/ra_hir/src/source_analyzer.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index 05147901e..58ae6ce41 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs @@ -317,8 +317,7 @@ fn scope_for_offset( if source.file_id != offset.file_id { return None; } - let syntax_node_ptr = - source.value.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr()); + let syntax_node_ptr = source.value.syntax_node_ptr(); Some((syntax_node_ptr, scope)) }) // find containing scope @@ -397,8 +396,7 @@ fn adjust( if source.file_id != file_id { return None; } - let syntax_node_ptr = - source.value.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr()); + let syntax_node_ptr = source.value.syntax_node_ptr(); Some((syntax_node_ptr, scope)) }) .map(|(ptr, scope)| (ptr.range(), scope)) -- cgit v1.2.3