@@ -368,19 +368,16 @@ mod cmd {
368368 builder. disable_continuous ( true ) ;
369369 }
370370
371- if let Some ( end_offset) = self . end {
372- if let Some ( start_offset) = self . start {
373- if end_offset < start_offset {
374- eprintln ! (
375- "Argument end-offset must be greater than or equal to specified start offset"
376- ) ;
377- return Err ( CliError :: from ( FluvioError :: CrossingOffsets (
378- start_offset,
379- end_offset,
380- ) )
381- . into ( ) ) ;
382- }
383- }
371+ if let Some ( end_offset) = self . end
372+ && let Some ( start_offset) = self . start
373+ && end_offset < start_offset
374+ {
375+ eprintln ! (
376+ "Argument end-offset must be greater than or equal to specified start offset"
377+ ) ;
378+ return Err (
379+ CliError :: from ( FluvioError :: CrossingOffsets ( start_offset, end_offset) ) . into ( ) ,
380+ ) ;
384381 }
385382
386383 if let Some ( isolation) = self . isolation {
@@ -507,12 +504,11 @@ mod cmd {
507504 & pb,
508505 ) ;
509506
510- if let Some ( potential_offset) = maybe_potential_end_offset {
511- if record. offset >= potential_offset as i64 {
507+ if let Some ( potential_offset) = maybe_potential_end_offset
508+ && record. offset >= potential_offset as i64 {
512509 eprintln!( "End-offset has been reached; exiting" ) ;
513510 break ;
514511 }
515- }
516512 } ,
517513 None => break ,
518514 } ,
@@ -567,12 +563,11 @@ mod cmd {
567563 & pb,
568564 ) ;
569565
570- if let Some ( potential_offset) = maybe_potential_end_offset {
571- if record. offset >= potential_offset as i64 {
566+ if let Some ( potential_offset) = maybe_potential_end_offset
567+ && record. offset >= potential_offset as i64 {
572568 eprintln!( "End-offset has been reached; exiting" ) ;
573569 break ;
574570 }
575- }
576571 } ,
577572 None => break ,
578573 } ,
@@ -584,12 +579,12 @@ mod cmd {
584579 }
585580 }
586581
587- if let Some ( ConsumeOutputType :: full_table) = & self . output {
588- if let Some ( mut terminal_stdout) = maybe_terminal_stdout {
589- disable_raw_mode ( ) ? ;
590- execute ! ( terminal_stdout . backend_mut ( ) , LeaveAlternateScreen , ) ?;
591- terminal_stdout. show_cursor ( ) ?;
592- }
582+ if let Some ( ConsumeOutputType :: full_table) = & self . output
583+ && let Some ( mut terminal_stdout) = maybe_terminal_stdout
584+ {
585+ disable_raw_mode ( ) ?;
586+ execute ! ( terminal_stdout. backend_mut ( ) , LeaveAlternateScreen , ) ?;
587+ terminal_stdout . show_cursor ( ) ? ;
593588 }
594589
595590 debug ! ( "fetch loop exited" ) ;
@@ -697,10 +692,10 @@ mod cmd {
697692 // (Some(_), None) only if JSON cannot be printed, so skip.
698693 _ => debug ! ( "Skipping record that cannot be formatted" ) ,
699694 }
700- } else if let Some ( term) = terminal {
701- if let Some ( table) = table_model {
702- table . render ( term ) ;
703- }
695+ } else if let Some ( term) = terminal
696+ && let Some ( table) = table_model
697+ {
698+ table . render ( term ) ;
704699 }
705700 }
706701
0 commit comments