diff options
Diffstat (limited to 'crates/ra_syntax/src/algo')
-rw-r--r-- | crates/ra_syntax/src/algo/mod.rs | 4 |
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 | ||
4 | use crate::{ | 4 | use 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 | ||
92 | pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef { | 92 | pub 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, |