Skip to content
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

wasm_bindgen::JsError doesn't implement Debug #4099

Closed
ldnvnbl opened this issue Aug 30, 2024 · 2 comments · Fixed by #4136
Closed

wasm_bindgen::JsError doesn't implement Debug #4099

ldnvnbl opened this issue Aug 30, 2024 · 2 comments · Fixed by #4136

Comments

@ldnvnbl
Copy link

ldnvnbl commented Aug 30, 2024

Summary

wasm_bindgen::JsError doesn't implement Debug

Additional Details

When I write unit test, I can't direct use unwrap or expect func, so I use match handle it, It's too long and ugly.
I want ask it can implement Debug or can some one tell me the best practice

@daxpedda
Copy link
Collaborator

daxpedda commented Sep 7, 2024

On a quick glance I could not tell why this was not done, so I'm happy to review a PR.

rcrisanti added a commit to rcrisanti/wasm-bindgen that referenced this issue Oct 2, 2024
This should allow using `.unwrap()` & `.expect()`
on it, in unit tests for example.

Resolves rustwasm#4099.
@rcrisanti
Copy link
Contributor

I also ran into this error recently, so I just opened up a PR for it here: #4136

rcrisanti added a commit to rcrisanti/wasm-bindgen that referenced this issue Oct 2, 2024
This should allow using `.unwrap()` & `.expect()`
on it, in unit tests for example.

Resolves rustwasm#4099.
daxpedda pushed a commit to rcrisanti/wasm-bindgen that referenced this issue Oct 7, 2024
This should allow using `.unwrap()` & `.expect()`
on it, in unit tests for example.

Resolves rustwasm#4099.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants