diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 6 |
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)) |