aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-11 18:25:33 +0100
committerAleksey Kladov <[email protected]>2020-04-11 18:36:31 +0100
commit0aece75cdd40daa4d48484103cfcd36ba13ba076 (patch)
tree6cfd504aa174c971242f5f0d16e8d0a7ff216ba2 /crates/ra_hir
parent7a39bc3ba29351feabcd4a16e12568a9e12818ca (diff)
Remove dead code
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/source_analyzer.rs6
1 files changed, 2 insertions, 4 deletions
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(
317 if source.file_id != offset.file_id { 317 if source.file_id != offset.file_id {
318 return None; 318 return None;
319 } 319 }
320 let syntax_node_ptr = 320 let syntax_node_ptr = source.value.syntax_node_ptr();
321 source.value.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr());
322 Some((syntax_node_ptr, scope)) 321 Some((syntax_node_ptr, scope))
323 }) 322 })
324 // find containing scope 323 // find containing scope
@@ -397,8 +396,7 @@ fn adjust(
397 if source.file_id != file_id { 396 if source.file_id != file_id {
398 return None; 397 return None;
399 } 398 }
400 let syntax_node_ptr = 399 let syntax_node_ptr = source.value.syntax_node_ptr();
401 source.value.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr());
402 Some((syntax_node_ptr, scope)) 400 Some((syntax_node_ptr, scope))
403 }) 401 })
404 .map(|(ptr, scope)| (ptr.range(), scope)) 402 .map(|(ptr, scope)| (ptr.range(), scope))