aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/matching_brace.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-24 22:40:41 +0100
committerAleksey Kladov <[email protected]>2020-04-25 10:59:18 +0100
commitb1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 (patch)
treee5d136c5ba4a6ba96aeeb423e6e3f64ca7cea3f9 /crates/ra_ide/src/matching_brace.rs
parent27a7718880d93f55f905da606d108d3b3c682ab4 (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.rs4
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
3use ra_syntax::{ast::AstNode, SourceFile, SyntaxKind, TextUnit, T}; 3use ra_syntax::{ast::AstNode, SourceFile, SyntaxKind, TextSize, T};
4 4
5pub fn matching_brace(file: &SourceFile, offset: TextUnit) -> Option<TextUnit> { 5pub 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