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_syntax/src/algo/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/algo') diff --git a/crates/ra_syntax/src/algo/mod.rs b/crates/ra_syntax/src/algo/mod.rs index d82c42b3e..f92529d3e 100644 --- a/crates/ra_syntax/src/algo/mod.rs +++ b/crates/ra_syntax/src/algo/mod.rs @@ -2,7 +2,7 @@ pub mod visit; // pub mod walk; use crate::{ - text_utils::{contains_offset_nonstrict, is_subrange}, + text_utils::{contains_offset_nonstrict}, SyntaxNodeRef, TextRange, TextUnit, }; @@ -91,7 +91,7 @@ impl<'f> Iterator for LeafAtOffset<'f> { pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef { assert!( - is_subrange(root.range(), range), + range.is_subrange(&root.range()), "node range: {:?}, target range: {:?}", root.range(), range, -- cgit v1.2.3