@@ -24,10 +24,11 @@ use crate::core::resolver::{HasDevUnits, Resolve};
24
24
use crate :: core:: source:: MaybePackage ;
25
25
use crate :: core:: { Dependency , Manifest , PackageId , SourceId , Target } ;
26
26
use crate :: core:: { SourceMap , Summary , Workspace } ;
27
- use crate :: ops;
28
27
use crate :: util:: config:: PackageCacheLock ;
29
28
use crate :: util:: errors:: { CargoResult , HttpNotSuccessful , DEBUG_HEADERS } ;
30
29
use crate :: util:: interning:: InternedString ;
30
+ use crate :: util:: network:: http:: http_handle_and_timeout;
31
+ use crate :: util:: network:: http:: HttpTimeout ;
31
32
use crate :: util:: network:: retry:: { Retry , RetryResult } ;
32
33
use crate :: util:: network:: sleep:: SleepTracker ;
33
34
use crate :: util:: { self , internal, Config , Progress , ProgressStyle } ;
@@ -348,7 +349,7 @@ pub struct Downloads<'a, 'cfg> {
348
349
/// Note that timeout management is done manually here instead of in libcurl
349
350
/// because we want to apply timeouts to an entire batch of operations, not
350
351
/// any one particular single operation.
351
- timeout : ops :: HttpTimeout ,
352
+ timeout : HttpTimeout ,
352
353
/// Last time bytes were received.
353
354
updated_at : Cell < Instant > ,
354
355
/// This is a slow-speed check. It is reset to `now + timeout_duration`
@@ -441,7 +442,7 @@ impl<'cfg> PackageSet<'cfg> {
441
442
442
443
pub fn enable_download < ' a > ( & ' a self ) -> CargoResult < Downloads < ' a , ' cfg > > {
443
444
assert ! ( !self . downloading. replace( true ) ) ;
444
- let timeout = ops :: HttpTimeout :: new ( self . config ) ?;
445
+ let timeout = HttpTimeout :: new ( self . config ) ?;
445
446
Ok ( Downloads {
446
447
start : Instant :: now ( ) ,
447
448
set : self ,
@@ -713,7 +714,7 @@ impl<'a, 'cfg> Downloads<'a, 'cfg> {
713
714
debug ! ( "downloading {} as {}" , id, token) ;
714
715
assert ! ( self . pending_ids. insert( id) ) ;
715
716
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 ) ?;
717
718
handle. get ( true ) ?;
718
719
handle. url ( & url) ?;
719
720
handle. follow_location ( true ) ?; // follow redirects
0 commit comments