aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index ca6b25516..9ee5467ed 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -316,8 +316,9 @@ impl Analysis {
316 316
317 /// Returns position of the mathcing brace (all types of braces are 317 /// Returns position of the mathcing brace (all types of braces are
318 /// supported). 318 /// supported).
319 pub fn matching_brace(&self, file: &SourceFile, offset: TextUnit) -> Option<TextUnit> { 319 pub fn matching_brace(&self, position: FilePosition) -> Option<TextUnit> {
320 ra_ide_api_light::matching_brace(file, offset) 320 let file = self.db.source_file(position.file_id);
321 ra_ide_api_light::matching_brace(&file, position.offset)
321 } 322 }
322 323
323 /// Returns a syntax tree represented as `String`, for debug purposes. 324 /// Returns a syntax tree represented as `String`, for debug purposes.