mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-19 08:40:24 +00:00
Remove code duplication in tests
This commit is contained in:
parent
ae0aeb1b23
commit
52fd19621c
3 changed files with 75 additions and 102 deletions
|
@ -83,6 +83,7 @@ fn try_extract_range(text: &str) -> Option<(TextRange, String)> {
|
|||
Some((TextRange::from_to(start, end), text))
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum RangeOrOffset {
|
||||
Range(TextRange),
|
||||
Offset(TextUnit),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue