File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ impl fmt::Display for LexicalErrorType {
4242 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
4343 match self {
4444 LexicalErrorType :: StringError => write ! ( f, "Got unexpected string" ) ,
45- LexicalErrorType :: FStringError ( error) => write ! ( f, "Got error in f-string: {error}" ) ,
45+ LexicalErrorType :: FStringError ( error) => write ! ( f, "f-string: {error}" ) ,
4646 LexicalErrorType :: UnicodeError => write ! ( f, "Got unexpected unicode" ) ,
4747 LexicalErrorType :: NestingError => write ! ( f, "Got unexpected nesting" ) ,
4848 LexicalErrorType :: IndentationError => {
Original file line number Diff line number Diff line change @@ -358,11 +358,7 @@ impl<'a> StringParser<'a> {
358358 }
359359 }
360360 }
361- Err ( if expression. trim ( ) . is_empty ( ) {
362- FStringError :: new ( EmptyExpression , self . get_pos ( ) ) . into ( )
363- } else {
364- FStringError :: new ( UnclosedLbrace , self . get_pos ( ) ) . into ( )
365- } )
361+ Err ( FStringError :: new ( UnclosedLbrace , self . get_pos ( ) ) . into ( ) )
366362 }
367363
368364 fn parse_spec ( & mut self , nested : u8 ) -> Result < Vec < Expr > , LexicalError > {
You can’t perform that action at this time.
0 commit comments