@@ -47,17 +47,6 @@ pub trait Key: Eq + Hash + Clone + Debug + Unpin + Send + 'static {}
47
47
48
48
impl < T > Key for T where T : Eq + Hash + Clone + Debug + Unpin + Send + ' static { }
49
49
50
- type OldKey = ( http:: uri:: Scheme , http:: uri:: Authority ) ;
51
-
52
- fn assert ( ) {
53
- let x: OldKey = ( http:: uri:: Scheme :: HTTP , "x" . parse ( ) . expect ( "host key" ) ) ;
54
- test ( x) ;
55
- }
56
- fn test < T : Key > ( a : T ) {
57
- }
58
-
59
- // impl Key for OldKey {}
60
-
61
50
/// When checking out a pooled connection, it might be that the connection
62
51
/// only supports a single reservation, or it might be usable for many.
63
52
///
@@ -810,18 +799,18 @@ impl<T> WeakOpt<T> {
810
799
811
800
#[ cfg( all( test, not( miri) ) ) ]
812
801
mod tests {
802
+ use std:: fmt:: Debug ;
813
803
use std:: future:: Future ;
804
+ use std:: hash:: Hash ;
814
805
use std:: pin:: Pin ;
815
806
use std:: task:: { self , Poll } ;
816
807
use std:: time:: Duration ;
817
- use std:: fmt:: { self , Debug } ;
818
- use std:: hash:: Hash ;
819
808
820
- use super :: { Connecting , Pool , Poolable , Reservation , WeakOpt , Key } ;
809
+ use super :: { Connecting , Key , Pool , Poolable , Reservation , WeakOpt } ;
821
810
use crate :: common:: exec:: Exec ;
822
811
823
812
#[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
824
- struct KeyImpl ( http:: uri:: Scheme , http:: uri:: Authority ) ;
813
+ struct KeyImpl ( http:: uri:: Scheme , http:: uri:: Authority ) ;
825
814
826
815
type KeyTuple = ( http:: uri:: Scheme , http:: uri:: Authority ) ;
827
816
@@ -852,7 +841,6 @@ mod tests {
852
841
853
842
fn host_key ( s : & str ) -> KeyImpl {
854
843
KeyImpl ( http:: uri:: Scheme :: HTTP , s. parse ( ) . expect ( "host key" ) )
855
-
856
844
}
857
845
858
846
fn pool_no_timer < T , K : Key > ( ) -> Pool < T , K > {
0 commit comments