From 7f4b07a9076a38b2bd0fa0518ba090311dcaf880 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 21:02:47 +0300 Subject: Refactor --- crates/libeditor/src/completion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/libeditor/src/completion.rs') diff --git a/crates/libeditor/src/completion.rs b/crates/libeditor/src/completion.rs index 242a3a434..cea2d14d1 100644 --- a/crates/libeditor/src/completion.rs +++ b/crates/libeditor/src/completion.rs @@ -8,7 +8,7 @@ use libsyntax2::{ use { AtomEdit, find_node_at_offset, - scope::{FnScopes, compute_scopes}, + scope::FnScopes, }; #[derive(Debug)] @@ -25,7 +25,7 @@ pub fn scope_completion(file: &File, offset: TextUnit) -> Option(file.syntax(), offset)?; let fn_def = ancestors(name_ref.syntax()).filter_map(ast::FnDef::cast).next()?; - let scopes = compute_scopes(fn_def); + let scopes = FnScopes::new(fn_def); Some(complete(name_ref, &scopes)) } -- cgit v1.2.3