Fix clippy error

This commit is contained in:
harupy 2023-01-03 12:51:31 +09:00
parent 9030679193
commit 3b0fd61b3b

View file

@ -125,7 +125,7 @@ impl<'a> StringParser<'a> {
}
unicode_names2::character(&name)
.ok_or(LexicalError::new(LexicalErrorType::UnicodeError, start_pos))
.ok_or_else(|| LexicalError::new(LexicalErrorType::UnicodeError, start_pos))
}
fn parse_escaped_char(&mut self) -> Result<String, LexicalError> {