Skip to content

Commit

Permalink
fix: print out error in case of range size is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
zitsen committed Jan 26, 2018
1 parent d78f153 commit 578115b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ fn main() {
let mut wtr = csv::WriterBuilder::new().delimiter(*delimiter).from_path(path).expect("open csv");
let size = range.get_size();
println!("** sheet range size is {:?}", size);
if size.0 == 0 || size.1 == 0 {
eprintln!("worsheet range sizes should not be 0, continue");
continue;
}
println!("** start writing", );
let mut pb = ProgressBar::new(100);
let rows = range.rows();
Expand Down

0 comments on commit 578115b

Please sign in to comment.