feat(net): remove mut requirement for NetworkConnector.connect()

BREAKING CHANGE: Any custom Connectors will need to change to &self in
  the connect method. Any Connectors that needed the mutablity need to
  figure out a synchronization strategy.

  Request::with_connector() takes a &NetworkConnector instead of &mut.
  Any uses of with_connector will need to change to passing &C.
This commit is contained in:
Sean McArthur
2015-05-08 20:54:05 -07:00
parent 7bc4e83ec2
commit 1b318724a5
6 changed files with 16 additions and 16 deletions

View File

@@ -47,7 +47,7 @@ impl Request<Fresh> {
}
/// Create a new client request with a specific underlying NetworkStream.
pub fn with_connector<C, S>(method: method::Method, url: Url, connector: &mut C)
pub fn with_connector<C, S>(method: method::Method, url: Url, connector: &C)
-> ::Result<Request<Fresh>> where
C: NetworkConnector<Stream=S>,
S: Into<Box<NetworkStream + Send>> {