diff options
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r-- | crates/ide_db/src/search.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs index ddcfbd3f3..fa18703e1 100644 --- a/crates/ide_db/src/search.rs +++ b/crates/ide_db/src/search.rs | |||
@@ -86,6 +86,10 @@ impl SearchScope { | |||
86 | SearchScope::new(std::iter::once((file, None)).collect()) | 86 | SearchScope::new(std::iter::once((file, None)).collect()) |
87 | } | 87 | } |
88 | 88 | ||
89 | pub fn file_range(range: FileRange) -> SearchScope { | ||
90 | SearchScope::new(std::iter::once((range.file_id, Some(range.range))).collect()) | ||
91 | } | ||
92 | |||
89 | pub fn files(files: &[FileId]) -> SearchScope { | 93 | pub fn files(files: &[FileId]) -> SearchScope { |
90 | SearchScope::new(files.iter().map(|f| (*f, None)).collect()) | 94 | SearchScope::new(files.iter().map(|f| (*f, None)).collect()) |
91 | } | 95 | } |