aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/algo
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-30 18:26:55 +0000
committerAleksey Kladov <[email protected]>2018-10-30 18:26:55 +0000
commit1643d94a65a66f32b9278829dd3af00883f3852b (patch)
tree95344947f1957d03edcbcd6ef8a2786cc1b9142d /crates/ra_syntax/src/algo
parent950e8b8182897da60bcece70d84e9f0b6dc88632 (diff)
switch to TextRange::subrange
Diffstat (limited to 'crates/ra_syntax/src/algo')
-rw-r--r--crates/ra_syntax/src/algo/mod.rs4
1 files changed, 2 insertions, 2 deletions
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;
2// pub mod walk; 2// pub mod walk;
3 3
4use crate::{ 4use crate::{
5 text_utils::{contains_offset_nonstrict, is_subrange}, 5 text_utils::{contains_offset_nonstrict},
6 SyntaxNodeRef, TextRange, TextUnit, 6 SyntaxNodeRef, TextRange, TextUnit,
7}; 7};
8 8
@@ -91,7 +91,7 @@ impl<'f> Iterator for LeafAtOffset<'f> {
91 91
92pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef { 92pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef {
93 assert!( 93 assert!(
94 is_subrange(root.range(), range), 94 range.is_subrange(&root.range()),
95 "node range: {:?}, target range: {:?}", 95 "node range: {:?}, target range: {:?}",
96 root.range(), 96 root.range(),
97 range, 97 range,