@@ -315,8 +315,7 @@ impl<'pest> FromPest<'pest> for TermTail<'pest> {
315315 // First try to get an operator - if not present, no match
316316 let op = MulOp :: from_pest ( pest) ?;
317317 // Then get the factor - if operator succeeded, factor must succeed
318- let factor = Factor :: from_pest ( pest)
319- . map_err ( |_| from_pest:: ConversionError :: NoMatch ) ?;
318+ let factor = Factor :: from_pest ( pest) . map_err ( |_| from_pest:: ConversionError :: NoMatch ) ?;
320319 Ok ( TermTail { op, factor } )
321320 }
322321}
@@ -359,8 +358,7 @@ impl<'pest> FromPest<'pest> for ArithTail<'pest> {
359358 pest : & mut pest:: iterators:: Pairs < ' pest , Rule > ,
360359 ) -> Result < Self , from_pest:: ConversionError < from_pest:: Void > > {
361360 let op = AddOp :: from_pest ( pest) ?;
362- let term = Term :: from_pest ( pest)
363- . map_err ( |_| from_pest:: ConversionError :: NoMatch ) ?;
361+ let term = Term :: from_pest ( pest) . map_err ( |_| from_pest:: ConversionError :: NoMatch ) ?;
364362 Ok ( ArithTail { op, term } )
365363 }
366364}
@@ -401,8 +399,7 @@ impl<'pest> FromPest<'pest> for CompTail<'pest> {
401399 pest : & mut pest:: iterators:: Pairs < ' pest , Rule > ,
402400 ) -> Result < Self , from_pest:: ConversionError < from_pest:: Void > > {
403401 let op = CompOp :: from_pest ( pest) ?;
404- let expr = ArithExpr :: from_pest ( pest)
405- . map_err ( |_| from_pest:: ConversionError :: NoMatch ) ?;
402+ let expr = ArithExpr :: from_pest ( pest) . map_err ( |_| from_pest:: ConversionError :: NoMatch ) ?;
406403 Ok ( CompTail { op, expr } )
407404 }
408405}
@@ -489,7 +486,10 @@ mod tests {
489486 if let Atom :: Number ( n) = & expr. comparison . first . first . first . atom {
490487 assert_eq ! ( n. value, 42 ) ;
491488 } else {
492- panic ! ( "Expected Number, got {:?}" , expr. comparison. first. first. first. atom) ;
489+ panic ! (
490+ "Expected Number, got {:?}" ,
491+ expr. comparison. first. first. first. atom
492+ ) ;
493493 }
494494 }
495495
0 commit comments