xfbs / diff.rs

Web application to render a diff between Rust crate versions. Implemented in Yew, runs fully in the browser as WebAssembly.
https://diff.rs
MIT License
86 stars 6 forks source link

Crashes at unwrapped None in diff_view.rs #3

Closed chrysn closed 1 year ago

chrysn commented 1 year ago

There's a panic that happens when loading the coap-handler-implementations crate.

Example URI: https://diff.rs/coap-handler-implementations/0.4.1/0.4.2/src/

Error message:

panicked at 'called `Option::unwrap()` on a `None` value', src/components/diff_view.rs:88:47
xfbs commented 1 year ago

Thanks for spotting this! Turns out I had introduced this regression. Should be fixed now, there was two paths in the code where it would panic if you are trying to view something that is not a file (in src/components/diff_view.rs:88) or a file that does not exist (in src/components/file_tree.rs). Just deployed the fixes, let me know if anything else causes it to panic!