diff options
Diffstat (limited to 'crates/ra_syntax/src/validation.rs')
-rw-r--r-- | crates/ra_syntax/src/validation.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index a2509dc90..61cf83c84 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs | |||
@@ -1,11 +1,12 @@ | |||
1 | use std::u32; | 1 | use std::u32; |
2 | 2 | ||
3 | use arrayvec::ArrayString; | ||
4 | |||
3 | use crate::{ | 5 | use crate::{ |
4 | algo::visit::{visitor_ctx, VisitorCtx}, | 6 | algo::visit::{visitor_ctx, VisitorCtx}, |
5 | ast::{self, AstNode}, | 7 | ast::{self, AstNode}, |
6 | File, | 8 | File, |
7 | string_lexing::{self, CharComponentKind}, | 9 | string_lexing::{self, CharComponentKind}, |
8 | utils::MutAsciiString, | ||
9 | yellow::{ | 10 | yellow::{ |
10 | SyntaxError, | 11 | SyntaxError, |
11 | SyntaxErrorKind::*, | 12 | SyntaxErrorKind::*, |
@@ -76,8 +77,7 @@ fn validate_char(node: ast::Char, errors: &mut Vec<SyntaxError>) { | |||
76 | return; | 77 | return; |
77 | } | 78 | } |
78 | 79 | ||
79 | let mut buf = &mut [0; 6]; | 80 | let mut code = ArrayString::<[_; 6]>::new(); |
80 | let mut code = MutAsciiString::new(buf); | ||
81 | let mut closed = false; | 81 | let mut closed = false; |
82 | for c in text[3..].chars() { | 82 | for c in text[3..].chars() { |
83 | assert!(!closed, "no characters after escape is closed"); | 83 | assert!(!closed, "no characters after escape is closed"); |