Implement Default for Client, ClientBuilder and Form (#712)

This commit is contained in:
Rodolfo P A
2019-11-21 16:52:17 -03:00
committed by Sean McArthur
parent 3a24cc1d4b
commit 80ba8cc150
2 changed files with 18 additions and 0 deletions

View File

@@ -86,6 +86,12 @@ struct Config {
cookie_store: Option<cookie::CookieStore>,
}
impl Default for ClientBuilder {
fn default() -> Self {
Self::new()
}
}
impl ClientBuilder {
/// Constructs a new `ClientBuilder`.
///
@@ -601,6 +607,12 @@ impl ClientBuilder {
type HyperClient = hyper::Client<Connector, super::body::ImplStream>;
impl Default for Client {
fn default() -> Self {
Self::new()
}
}
impl Client {
/// Constructs a new `Client`.
///

View File

@@ -44,6 +44,12 @@ pub(crate) trait PartProps {
// ===== impl Form =====
impl Default for Form {
fn default() -> Self {
Self::new()
}
}
impl Form {
/// Creates a new async Form without any content.
pub fn new() -> Form {