@@ -695,7 +695,7 @@ pub fn with_fetch_options(
695
695
let mut progress = Progress :: new ( "Fetch" , config) ;
696
696
network:: with_retry ( config, || {
697
697
with_authentication ( url, git_config, |f| {
698
- let mut last_recv = 0.0 ; // in Byte
698
+ let mut last_recv = 0 ; // in Byte
699
699
let mut last_update = Instant :: now ( ) ;
700
700
let mut rcb = git2:: RemoteCallbacks :: new ( ) ;
701
701
rcb. credentials ( f) ;
@@ -707,8 +707,8 @@ pub fn with_fetch_options(
707
707
} else {
708
708
// Receiving objects.
709
709
let duration = last_update. elapsed ( ) ;
710
- let recv = stats. received_bytes ( ) as f32 ;
711
- let rate = ( recv - last_recv) / duration. as_secs_f32 ( ) ;
710
+ let recv = stats. received_bytes ( ) ;
711
+ let rate = ( recv - last_recv) as f32 / duration. as_secs_f32 ( ) ;
712
712
if duration > Duration :: from_secs ( 3 ) {
713
713
last_recv = recv;
714
714
last_update = Instant :: now ( ) ;
@@ -718,9 +718,8 @@ pub fn with_fetch_options(
718
718
let i = ( bytes. log2 ( ) / 10.0 ) . min ( 4.0 ) as usize ;
719
719
( UNITS [ i] , bytes / 1024_f32 . powi ( i as i32 ) )
720
720
}
721
- let ( rate_unit, rate) = format_bytes ( rate) ;
722
- let ( unit, recv) = format_bytes ( recv) ;
723
- format ! ( ", {:.2}{}iB | {:.2}{}iB/s" , recv, unit, rate, rate_unit)
721
+ let ( unit, rate) = format_bytes ( rate) ;
722
+ format ! ( ", {:.2}{}iB/s" , rate, unit)
724
723
} ;
725
724
progress
726
725
. tick ( stats. indexed_objects ( ) , stats. total_objects ( ) , & msg)
0 commit comments