@@ -24,10 +24,11 @@ use crate::core::resolver::{HasDevUnits, Resolve};
2424use crate :: core:: source:: MaybePackage ;
2525use crate :: core:: { Dependency , Manifest , PackageId , SourceId , Target } ;
2626use crate :: core:: { SourceMap , Summary , Workspace } ;
27- use crate :: ops;
2827use crate :: util:: config:: PackageCacheLock ;
2928use crate :: util:: errors:: { CargoResult , HttpNotSuccessful , DEBUG_HEADERS } ;
3029use crate :: util:: interning:: InternedString ;
30+ use crate :: util:: network:: http:: http_handle_and_timeout;
31+ use crate :: util:: network:: http:: HttpTimeout ;
3132use crate :: util:: network:: retry:: { Retry , RetryResult } ;
3233use crate :: util:: network:: sleep:: SleepTracker ;
3334use crate :: util:: { self , internal, Config , Progress , ProgressStyle } ;
@@ -348,7 +349,7 @@ pub struct Downloads<'a, 'cfg> {
348349 /// Note that timeout management is done manually here instead of in libcurl
349350 /// because we want to apply timeouts to an entire batch of operations, not
350351 /// any one particular single operation.
351- timeout : ops :: HttpTimeout ,
352+ timeout : HttpTimeout ,
352353 /// Last time bytes were received.
353354 updated_at : Cell < Instant > ,
354355 /// This is a slow-speed check. It is reset to `now + timeout_duration`
@@ -441,7 +442,7 @@ impl<'cfg> PackageSet<'cfg> {
441442
442443 pub fn enable_download < ' a > ( & ' a self ) -> CargoResult < Downloads < ' a , ' cfg > > {
443444 assert ! ( !self . downloading. replace( true ) ) ;
444- let timeout = ops :: HttpTimeout :: new ( self . config ) ?;
445+ let timeout = HttpTimeout :: new ( self . config ) ?;
445446 Ok ( Downloads {
446447 start : Instant :: now ( ) ,
447448 set : self ,
@@ -713,7 +714,7 @@ impl<'a, 'cfg> Downloads<'a, 'cfg> {
713714 debug ! ( "downloading {} as {}" , id, token) ;
714715 assert ! ( self . pending_ids. insert( id) ) ;
715716
716- let ( mut handle, _timeout) = ops :: http_handle_and_timeout ( self . set . config ) ?;
717+ let ( mut handle, _timeout) = http_handle_and_timeout ( self . set . config ) ?;
717718 handle. get ( true ) ?;
718719 handle. url ( & url) ?;
719720 handle. follow_location ( true ) ?; // follow redirects
0 commit comments