@@ -140,7 +140,7 @@ struct ConnAdapter<C: NetworkConnector + Send>(C);
140
140
impl < C : NetworkConnector < Stream =S > + Send , S : NetworkStream + Send > NetworkConnector for ConnAdapter < C > {
141
141
type Stream = Box < NetworkStream + Send > ;
142
142
#[ inline]
143
- fn connect ( & mut self , host : & str , port : u16 , scheme : & str )
143
+ fn connect ( & self , host : & str , port : u16 , scheme : & str )
144
144
-> :: Result < Box < NetworkStream + Send > > {
145
145
Ok ( try!( self . 0 . connect ( host, port, scheme) ) . into ( ) )
146
146
}
@@ -155,7 +155,7 @@ struct Connector(Box<NetworkConnector<Stream=Box<NetworkStream + Send>> + Send>)
155
155
impl NetworkConnector for Connector {
156
156
type Stream = Box < NetworkStream + Send > ;
157
157
#[ inline]
158
- fn connect ( & mut self , host : & str , port : u16 , scheme : & str )
158
+ fn connect ( & self , host : & str , port : u16 , scheme : & str )
159
159
-> :: Result < Box < NetworkStream + Send > > {
160
160
Ok ( try!( self . 0 . connect ( host, port, scheme) ) . into ( ) )
161
161
}
@@ -170,7 +170,7 @@ impl NetworkConnector for Connector {
170
170
/// One of these will be built for you if you use one of the convenience
171
171
/// methods, such as `get()`, `post()`, etc.
172
172
pub struct RequestBuilder < ' a , U : IntoUrl > {
173
- client : & ' a mut Client ,
173
+ client : & ' a Client ,
174
174
url : U ,
175
175
headers : Option < Headers > ,
176
176
method : Method ,
@@ -225,7 +225,7 @@ impl<'a, U: IntoUrl> RequestBuilder<'a, U> {
225
225
} ;
226
226
227
227
loop {
228
- let mut req = try!( Request :: with_connector ( method. clone ( ) , url. clone ( ) , & mut client. connector ) ) ;
228
+ let mut req = try!( Request :: with_connector ( method. clone ( ) , url. clone ( ) , & client. connector ) ) ;
229
229
headers. as_ref ( ) . map ( |headers| req. headers_mut ( ) . extend ( headers. iter ( ) ) ) ;
230
230
231
231
match ( can_have_body, body. as_ref ( ) ) {
0 commit comments