Skip to content

Commit

Permalink
examples: show progress in output of a script
Browse files Browse the repository at this point in the history
  • Loading branch information
noritada committed Jul 31, 2024
1 parent a443bbf commit acf9f04
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/check_decoding_of_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ where
return Err("empty GRIB2 data".into());
}

for (_index, submessage) in grib.iter() {
eprintln!(" {}.{}", &_index.0, &_index.1);
let len = grib.len();
for (index, (message_index, submessage)) in grib.iter().enumerate() {
eprintln!(
" {}.{} ({}/{})",
&message_index.0, &message_index.1, index, len
);
let decoder = grib::Grib2SubmessageDecoder::from(submessage)?;
let _values = decoder.dispatch()?.collect::<Vec<_>>();
}
Expand Down

0 comments on commit acf9f04

Please sign in to comment.