Implement Default for Client, ClientBuilder, and Form (#811)
This commit is contained in:
@@ -63,6 +63,12 @@ pub struct ClientBuilder {
|
|||||||
timeout: Timeout,
|
timeout: Timeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for ClientBuilder {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl ClientBuilder {
|
impl ClientBuilder {
|
||||||
/// Constructs a new `ClientBuilder`.
|
/// Constructs a new `ClientBuilder`.
|
||||||
///
|
///
|
||||||
@@ -455,6 +461,12 @@ impl ClientBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Client {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
/// Constructs a new `Client`.
|
/// Constructs a new `Client`.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ pub struct Part {
|
|||||||
value: Body,
|
value: Body,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Form {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Form {
|
impl Form {
|
||||||
/// Creates a new Form without any content.
|
/// Creates a new Form without any content.
|
||||||
pub fn new() -> Form {
|
pub fn new() -> Form {
|
||||||
|
|||||||
Reference in New Issue
Block a user