There are probably a lot of locations in code where I used map_or (eg. for web_sys::window()) instead of just calling expect on it, since they should probably always be available in any browser environment. Further research to confirm this would be nice.
This convolutes the code and makes it harder to read, and I've made it reach fairly deep in this manner.
This was originally an intention to avoid panics, as suggested in the rust wasm guide as one possible approach by removing all panics. I likely did not get rid of all panics, and it seems as if the error strings included would also contribute to the wasm size, so it seems like a vain effort.
There are probably a lot of locations in code where I used map_or (eg. for
web_sys::window()) instead of just callingexpecton it, since they should probably always be available in any browser environment. Further research to confirm this would be nice.This convolutes the code and makes it harder to read, and I've made it reach fairly deep in this manner.
This was originally an intention to avoid panics, as suggested in the rust wasm guide as one possible approach by removing all panics. I likely did not get rid of all panics, and it seems as if the error strings included would also contribute to the wasm size, so it seems like a vain effort.