From 1643d94a65a66f32b9278829dd3af00883f3852b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 30 Oct 2018 21:26:55 +0300 Subject: switch to TextRange::subrange --- crates/ra_editor/src/completion.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ra_editor') diff --git a/crates/ra_editor/src/completion.rs b/crates/ra_editor/src/completion.rs index 0a3675255..a0b168bc6 100644 --- a/crates/ra_editor/src/completion.rs +++ b/crates/ra_editor/src/completion.rs @@ -3,7 +3,6 @@ use rustc_hash::{FxHashMap, FxHashSet}; use ra_syntax::{ algo::visit::{visitor, visitor_ctx, Visitor, VisitorCtx}, ast::{self, AstChildren, LoopBodyOwner, ModuleItemOwner}, - text_utils::is_subrange, AstNode, File, SyntaxKind::*, SyntaxNodeRef, TextUnit, @@ -191,7 +190,7 @@ fn is_in_loop_body(name_ref: ast::NameRef) -> bool { .visit::(LoopBodyOwner::loop_body) .accept(node); if let Some(Some(body)) = loop_body { - if is_subrange(body.syntax().range(), name_ref.syntax().range()) { + if name_ref.syntax().range().is_subrange(&body.syntax().range()) { return true; } } -- cgit v1.2.3