1
Fork 0

tut tut tut

This commit is contained in:
Ellen 2022-04-27 08:51:33 +01:00
parent de1026a67b
commit f697955c1e
8 changed files with 16 additions and 29 deletions

View file

@ -338,9 +338,7 @@ pub(super) fn check_for_substitution<'a>(
ch: char,
err: &mut Diagnostic,
) -> Option<token::TokenKind> {
let Some(&(_u_char, u_name, ascii_char)) = UNICODE_ARRAY.iter().find(|&&(c, _, _)| c == ch) else {
return None;
};
let &(_u_char, u_name, ascii_char) = UNICODE_ARRAY.iter().find(|&&(c, _, _)| c == ch)?;
let span = Span::with_root_ctxt(pos, pos + Pos::from_usize(ch.len_utf8()));