File tree 1 file changed +3
-18
lines changed 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> {
189
189
match ch {
190
190
// can be integrated better with the remaining code, but as a starting point ok
191
191
// 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 ( '=' ) ;
209
195
self . next_char ( ) ;
210
196
}
211
-
212
197
'!' if delims. is_empty ( ) && self . peek ( ) != Some ( & '=' ) => {
213
198
if expression. trim ( ) . is_empty ( ) {
214
199
return Err ( EmptyExpression . to_lexical_error ( self . get_pos ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments