Skip to content

Commit b90d02e

Browse files
committed
Appease clippy
1 parent 7c888d9 commit b90d02e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wasm/lib/src/browser_module.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ mod _browser {
7373
let mut opts = web_sys::RequestInit::new();
7474

7575
match method {
76-
Some(s) => opts.method(s.as_str()),
77-
None => opts.method("GET"),
76+
Some(s) => opts.set_method(s.as_str()),
77+
None => opts.set_method("GET"),
7878
};
7979

8080
if let Some(body) = body {
81-
opts.body(Some(&convert::py_to_js(vm, body)));
81+
opts.set_body(&convert::py_to_js(vm, body));
8282
}
8383

8484
let request = web_sys::Request::new_with_str_and_init(url.as_str(), &opts)
@@ -226,7 +226,7 @@ mod _browser {
226226
let weak_vm = weak_vm(vm);
227227

228228
let mut opts = web_sys::RequestInit::new();
229-
opts.method("GET");
229+
opts.set_method("GET");
230230

231231
let request = web_sys::Request::new_with_str_and_init(path.as_str(), &opts)
232232
.map_err(|err| convert::js_py_typeerror(vm, err))?;

0 commit comments

Comments
 (0)