File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: admin:: dialoguer;
2
2
use cargo_registry_index:: { Repository , RepositoryConfig } ;
3
- use indicatif:: { ProgressBar , ProgressIterator , ProgressStyle } ;
3
+ use indicatif:: { ProgressBar , ProgressStyle } ;
4
4
use reqwest:: blocking:: Client ;
5
5
6
6
use crate :: config;
@@ -35,10 +35,11 @@ pub fn run(opts: Opts) -> anyhow::Result<()> {
35
35
let pb = ProgressBar :: new ( files. len ( ) as u64 ) ;
36
36
pb. set_style ( ProgressStyle :: with_template ( "{bar:60} ({pos}/{len}, ETA {eta})" ) . unwrap ( ) ) ;
37
37
38
- for file in files. iter ( ) . progress_with ( pb ) {
38
+ for file in pb . wrap_iter ( files. iter ( ) ) {
39
39
let crate_name = file. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
40
40
let path = repo. index_file ( crate_name) ;
41
41
if !path. exists ( ) {
42
+ pb. suspend ( || println ! ( "skipping file `{}`" , crate_name) ) ;
42
43
continue ;
43
44
}
44
45
You can’t perform that action at this time.
0 commit comments