diff options
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r-- | crates/ide_db/src/search.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs index 38b20f2dc..22dd172f7 100644 --- a/crates/ide_db/src/search.rs +++ b/crates/ide_db/src/search.rs | |||
@@ -345,7 +345,7 @@ impl<'a> FindUsages<'a> { | |||
345 | for (file_id, search_range) in search_scope { | 345 | for (file_id, search_range) in search_scope { |
346 | let text = sema.db.file_text(file_id); | 346 | let text = sema.db.file_text(file_id); |
347 | let search_range = | 347 | let search_range = |
348 | search_range.unwrap_or(TextRange::up_to(TextSize::of(text.as_str()))); | 348 | search_range.unwrap_or_else(|| TextRange::up_to(TextSize::of(text.as_str()))); |
349 | 349 | ||
350 | let tree = Lazy::new(|| sema.parse(file_id).syntax().clone()); | 350 | let tree = Lazy::new(|| sema.parse(file_id).syntax().clone()); |
351 | 351 | ||