rustwasm / wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript
https://rustwasm.github.io/docs/wasm-bindgen/
Apache License 2.0
7.81k stars 1.08k forks source link

`wasm_bindgen::JsError` doesn't implement `Debug` #4099

Closed ldnvnbl closed 1 month ago

ldnvnbl commented 2 months ago

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 commented 2 months ago

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

rcrisanti commented 1 month ago

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