File tree Expand file tree Collapse file tree 2 files changed +6
-17
lines changed
Expand file tree Collapse file tree 2 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -182,16 +182,9 @@ fn parse_binary_op(s: &str) -> Option<BinOp> {
182182 }
183183}
184184
185- fn parse_int ( s : & str ) -> i64 {
186- match s. parse :: < i64 > ( ) {
187- Ok ( i) => i,
188- Err ( _) => 0 ,
189- }
190- }
191-
192185fn eval_binary_int ( op : & BinOp , s1 : & str , s2 : & str ) -> bool {
193- let i1 = parse_int ( s1 ) ;
194- let i2 = parse_int ( s2 ) ;
186+ let i1: i64 = s1 . parse ( ) . unwrap_or ( 0 ) ;
187+ let i2: i64 = s2 . parse ( ) . unwrap_or ( 0 ) ;
195188
196189 match op {
197190 BinOp :: IntEq => i1 == i2,
Original file line number Diff line number Diff line change @@ -355,14 +355,10 @@ impl Parameters {
355355
356356 let ( first_page, last_page) = args. pages . unwrap_or ( ( 1 , None ) ) ;
357357
358- let num_columns = {
359- if args. merge {
360- args. file . len ( )
361- } else if let Some ( n) = args. columns {
362- n
363- } else {
364- 1
365- }
358+ let num_columns = if args. merge {
359+ args. file . len ( )
360+ } else {
361+ args. columns . unwrap_or ( 1 )
366362 } ;
367363
368364 let form_feed = args. form_feed || args. form_feed_with_pause ;
You can’t perform that action at this time.
0 commit comments