Skip to content

Commit 3b0fd61

Browse files
committed
Fix clippy error
1 parent 9030679 commit 3b0fd61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎parser/src/string_parser.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl<'a> StringParser<'a> {
125125
}
126126

127127
unicode_names2::character(&name)
128-
.ok_or(LexicalError::new(LexicalErrorType::UnicodeError, start_pos))
128+
.ok_or_else(|| LexicalError::new(LexicalErrorType::UnicodeError, start_pos))
129129
}
130130

131131
fn parse_escaped_char(&mut self) -> Result<String, LexicalError> {

0 commit comments

Comments
 (0)