diff options
author | Aleksey Kladov <[email protected]> | 2020-04-24 22:40:41 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-25 10:59:18 +0100 |
commit | b1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 (patch) | |
tree | e5d136c5ba4a6ba96aeeb423e6e3f64ca7cea3f9 /crates/ra_ide/src/matching_brace.rs | |
parent | 27a7718880d93f55f905da606d108d3b3c682ab4 (diff) |
Convert code to text-size
Diffstat (limited to 'crates/ra_ide/src/matching_brace.rs')
-rw-r--r-- | crates/ra_ide/src/matching_brace.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/matching_brace.rs b/crates/ra_ide/src/matching_brace.rs index d1204fac0..b85348706 100644 --- a/crates/ra_ide/src/matching_brace.rs +++ b/crates/ra_ide/src/matching_brace.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use ra_syntax::{ast::AstNode, SourceFile, SyntaxKind, TextUnit, T}; | 3 | use ra_syntax::{ast::AstNode, SourceFile, SyntaxKind, TextSize, T}; |
4 | 4 | ||
5 | pub fn matching_brace(file: &SourceFile, offset: TextUnit) -> Option<TextUnit> { | 5 | pub fn matching_brace(file: &SourceFile, offset: TextSize) -> Option<TextSize> { |
6 | const BRACES: &[SyntaxKind] = | 6 | const BRACES: &[SyntaxKind] = |
7 | &[T!['{'], T!['}'], T!['['], T![']'], T!['('], T![')'], T![<], T![>]]; | 7 | &[T!['{'], T!['}'], T!['['], T![']'], T!['('], T![')'], T![<], T![>]]; |
8 | let (brace_node, brace_idx) = file | 8 | let (brace_node, brace_idx) = file |