Implement Default for Client and ClientBuilder on the wasm32 target (#813)
This commit is contained in:
@@ -101,6 +101,12 @@ impl Client {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Client {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
async fn fetch(req: Request) -> crate::Result<Response> {
|
||||
// Build the js Request
|
||||
let mut init = web_sys::RequestInit::new();
|
||||
@@ -182,3 +188,9 @@ impl ClientBuilder {
|
||||
Ok(Client(()))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ClientBuilder {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user