mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
make matching brace consistent
This commit is contained in:
parent
c517696fab
commit
1ec1bd8139
2 changed files with 4 additions and 4 deletions
|
@ -316,8 +316,9 @@ impl Analysis {
|
|||
|
||||
/// Returns position of the mathcing brace (all types of braces are
|
||||
/// supported).
|
||||
pub fn matching_brace(&self, file: &SourceFile, offset: TextUnit) -> Option<TextUnit> {
|
||||
ra_ide_api_light::matching_brace(file, offset)
|
||||
pub fn matching_brace(&self, position: FilePosition) -> Option<TextUnit> {
|
||||
let file = self.db.source_file(position.file_id);
|
||||
ra_ide_api_light::matching_brace(&file, position.offset)
|
||||
}
|
||||
|
||||
/// Returns a syntax tree represented as `String`, for debug purposes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue