From be041d915a55fa1b5088e112b81727b864949976 Mon Sep 17 00:00:00 2001 From: Marius Seritan Date: Fri, 15 May 2015 22:23:44 -0700 Subject: [PATCH] feat(client): implement Default trait for client Initial implementation of the default trait. --- src/client/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index 572e092429..386c9249e8 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -135,6 +135,10 @@ fn with_connector + Send + 'static, S: NetworkStre Connector(Box::new(ConnAdapter(c))) } +impl Default for Client { + fn default() -> Client { Client::new() } +} + struct ConnAdapter(C); impl + Send, S: NetworkStream + Send> NetworkConnector for ConnAdapter { @@ -372,7 +376,7 @@ pub enum RedirectPolicy { FollowIf(fn(&Url) -> bool), } -// This is a hack because of upstream typesystem issues. +// This is a hack because of upstream typesystem issues. impl Clone for RedirectPolicy { fn clone(&self) -> RedirectPolicy { *self