Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/highlight_related.rs')
-rw-r--r--crates/ide/src/highlight_related.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs
index bbe14f0f8b..065c3f2452 100644
--- a/crates/ide/src/highlight_related.rs
+++ b/crates/ide/src/highlight_related.rs
@@ -541,11 +541,7 @@ fn original_range(
file_id: HirFileId,
text_range: Option<TextRange>,
) -> Option<TextRange> {
- if text_range.is_none() || !file_id.is_macro() {
- return text_range;
- }
-
- InFile::new(file_id, text_range.unwrap())
+ InFile::new(file_id, text_range?)
.original_node_file_range_opt(db)
.map(|(frange, _)| frange.range)
}