Skip to content

Commit 10494c9

Browse files
committed
Fix clippy error
1 parent b2be314 commit 10494c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/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)