-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deprecation warning for wasm-bindgen >= 0.2.93 #906
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the PR. I think it's good in general. I'd prefer some thing to be different. Unless there are good reasons that I've overlooked.
If that's a problem, I can also change it after merging.
src/tools.rs
Outdated
@@ -253,7 +253,7 @@ pub async fn get( | |||
version: Option<&str>, | |||
offline: bool, | |||
client_options: &HttpClientOptions, | |||
) -> Result<PathBuf> { | |||
) -> Result<(PathBuf, String)> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a fan of having this as a mandatory return value. Maybe we can have a get_details
function, which returns a struct (which we can extend later). And then have an implementation of get
reusing that new function, dropping everything exception the path.
c042c0c
to
7884303
Compare
Thanks for the suggestions. I introduced a |
Co-authored-by: Jens Reimann <ctron@dentrassi.de>
f65407c
to
56f1b02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change. I updated the API. Looks good.
This closes #905 by passing an object to
init
instead when the version of wasm-bindgen is >= 0.2.93.