File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -189,26 +189,11 @@ impl<'a> StringParser<'a> {
189189 match ch {
190190 // can be integrated better with the remaining code, but as a starting point ok
191191 // in general I would do here a tokenizing of the fstrings to omit this peeking.
192- '!' if self . peek ( ) == Some ( & '=' ) => {
193- expression. push_str ( "!=" ) ;
194- self . next_char ( ) ;
195- }
196-
197- '=' if self . peek ( ) == Some ( & '=' ) => {
198- expression. push_str ( "==" ) ;
199- self . next_char ( ) ;
200- }
201-
202- '>' if self . peek ( ) == Some ( & '=' ) => {
203- expression. push_str ( ">=" ) ;
204- self . next_char ( ) ;
205- }
206-
207- '<' if self . peek ( ) == Some ( & '=' ) => {
208- expression. push_str ( "<=" ) ;
192+ '!' | '=' | '>' | '<' if self . peek ( ) == Some ( & '=' ) => {
193+ expression. push ( ch) ;
194+ expression. push ( '=' ) ;
209195 self . next_char ( ) ;
210196 }
211-
212197 '!' if delims. is_empty ( ) && self . peek ( ) != Some ( & '=' ) => {
213198 if expression. trim ( ) . is_empty ( ) {
214199 return Err ( EmptyExpression . to_lexical_error ( self . get_pos ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments