mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +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,6 @@ pub(crate) mod module;
|
|||
|
||||
use ra_syntax::{
|
||||
ast::{self, AstNode, NameOwner},
|
||||
text_utils::is_subrange,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -23,7 +22,7 @@ impl FnDescriptor {
|
|||
let label: String = node
|
||||
.syntax()
|
||||
.children()
|
||||
.filter(|child| !is_subrange(body_range, child.range()))
|
||||
.filter(|child| !child.range().is_subrange(&body_range))
|
||||
.map(|node| node.text().to_string())
|
||||
.collect();
|
||||
label
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue