aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-13 09:29:47 +0100
committerAleksey Kladov <[email protected]>2019-04-13 09:29:47 +0100
commitb260641e0caa3938151afe66fa3bf5691b8c3caa (patch)
tree5af23f20b86fcec3b13b1315237ba73ff9aa9dcd /crates/ra_hir/src/source_binder.rs
parentf9e825d95624129b66c34f25904f6ae46b9d5760 (diff)
slight encapsulation
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 34a00a300..8d53079c6 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -368,7 +368,7 @@ fn scope_for_offset(
368 offset: TextUnit, 368 offset: TextUnit,
369) -> Option<ScopeId> { 369) -> Option<ScopeId> {
370 scopes 370 scopes
371 .scope_for 371 .scope_by_expr()
372 .iter() 372 .iter()
373 .filter_map(|(id, scope)| Some((source_map.expr_syntax(*id)?, scope))) 373 .filter_map(|(id, scope)| Some((source_map.expr_syntax(*id)?, scope)))
374 // find containing scope 374 // find containing scope
@@ -388,7 +388,7 @@ fn adjust(
388) -> Option<ScopeId> { 388) -> Option<ScopeId> {
389 let r = ptr.range(); 389 let r = ptr.range();
390 let child_scopes = scopes 390 let child_scopes = scopes
391 .scope_for 391 .scope_by_expr()
392 .iter() 392 .iter()
393 .filter_map(|(id, scope)| Some((source_map.expr_syntax(*id)?, scope))) 393 .filter_map(|(id, scope)| Some((source_map.expr_syntax(*id)?, scope)))
394 .map(|(ptr, scope)| (ptr.range(), scope)) 394 .map(|(ptr, scope)| (ptr.range(), scope))