Skip to content

Commit

Permalink
chore: suppress wasm web-sys deprecation warnings (#2386)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Aug 13, 2024
1 parent 86a18a3 commit dd036db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wasm/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ impl fmt::Debug for Body {
}
}

// Can use new methods in web-sys when requiring v0.2.93.
// > `init.method(m)` to `init.set_method(m)`
// For now, ignore their deprecation.
#[allow(deprecated)]
#[cfg(test)]
mod tests {
use crate::Body;
Expand Down
4 changes: 4 additions & 0 deletions src/wasm/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ impl fmt::Debug for ClientBuilder {
}
}

// Can use new methods in web-sys when requiring v0.2.93.
// > `init.method(m)` to `init.set_method(m)`
// For now, ignore their deprecation.
#[allow(deprecated)]
async fn fetch(req: Request) -> crate::Result<Response> {
// Build the js Request
let mut init = web_sys::RequestInit::new();
Expand Down

0 comments on commit dd036db

Please sign in to comment.