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

This commit is contained in:
Jack Moffitt
2020-02-20 00:02:49 -06:00
committed by GitHub
parent f831d62da0
commit 5a2cf97872
2 changed files with 18 additions and 0 deletions

View File

@@ -63,6 +63,12 @@ pub struct ClientBuilder {
timeout: Timeout,
}
impl Default for ClientBuilder {
fn default() -> Self {
Self::new()
}
}
impl ClientBuilder {
/// Constructs a new `ClientBuilder`.
///
@@ -455,6 +461,12 @@ impl ClientBuilder {
}
}
impl Default for Client {
fn default() -> Self {
Self::new()
}
}
impl Client {
/// Constructs a new `Client`.
///

View File

@@ -58,6 +58,12 @@ pub struct Part {
value: Body,
}
impl Default for Form {
fn default() -> Self {
Self::new()
}
}
impl Form {
/// Creates a new Form without any content.
pub fn new() -> Form {