Implement Default for Client, ClientBuilder and Form (#712)
This commit is contained in:
committed by
Sean McArthur
parent
3a24cc1d4b
commit
80ba8cc150
@@ -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`.
|
||||
///
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user