Implement Default for Client, ClientBuilder, and Form (#811)
This commit is contained in:
@@ -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`.
|
||||
///
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user