mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-21 17:50:18 +00:00
switch to TextRange::subrange
This commit is contained in:
parent
950e8b8182
commit
1643d94a65
4 changed files with 4 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue