@@ -6,7 +6,7 @@ use std::time::Duration;
6
6
7
7
use url:: Url ;
8
8
9
- use method:: { self , Method } ;
9
+ use method:: Method ;
10
10
use header:: Headers ;
11
11
use header:: Host ;
12
12
use net:: { NetworkStream , NetworkConnector , DefaultConnector , Fresh , Streaming } ;
@@ -28,7 +28,7 @@ pub struct Request<W> {
28
28
29
29
message : Box < HttpMessage > ,
30
30
headers : Headers ,
31
- method : method :: Method ,
31
+ method : Method ,
32
32
33
33
_marker : PhantomData < W > ,
34
34
}
@@ -40,7 +40,7 @@ impl<W> Request<W> {
40
40
41
41
/// Read the Request method.
42
42
#[ inline]
43
- pub fn method ( & self ) -> method :: Method { self . method . clone ( ) }
43
+ pub fn method ( & self ) -> Method { self . method . clone ( ) }
44
44
45
45
/// Set the write timeout.
46
46
#[ inline]
@@ -59,7 +59,7 @@ impl Request<Fresh> {
59
59
/// Create a new `Request<Fresh>` that will use the given `HttpMessage` for its communication
60
60
/// with the server. This implies that the given `HttpMessage` instance has already been
61
61
/// properly initialized by the caller (e.g. a TCP connection's already established).
62
- pub fn with_message ( method : method :: Method , url : Url , message : Box < HttpMessage > )
62
+ pub fn with_message ( method : Method , url : Url , message : Box < HttpMessage > )
63
63
-> :: Result < Request < Fresh > > {
64
64
let ( host, port) = try!( get_host_and_port ( & url) ) ;
65
65
let mut headers = Headers :: new ( ) ;
@@ -79,13 +79,13 @@ impl Request<Fresh> {
79
79
}
80
80
81
81
/// Create a new client request.
82
- pub fn new ( method : method :: Method , url : Url ) -> :: Result < Request < Fresh > > {
82
+ pub fn new ( method : Method , url : Url ) -> :: Result < Request < Fresh > > {
83
83
let mut conn = DefaultConnector :: default ( ) ;
84
84
Request :: with_connector ( method, url, & mut conn)
85
85
}
86
86
87
87
/// Create a new client request with a specific underlying NetworkStream.
88
- pub fn with_connector < C , S > ( method : method :: Method , url : Url , connector : & C )
88
+ pub fn with_connector < C , S > ( method : Method , url : Url , connector : & C )
89
89
-> :: Result < Request < Fresh > > where
90
90
C : NetworkConnector < Stream =S > ,
91
91
S : Into < Box < NetworkStream + Send > > {
0 commit comments