rust-url-parse
rust-url-parse copied to clipboard
Idioimatically handle parsing errors
https://github.com/peteyy/rust-url-parse/blob/918ad50c704c67eb474ba0fd9bad76f543290561/neon/native/src/lib.rs#L14-L16
These lines should read Url::parse(&url).map_err(Throw)?
where Throw
is from neon::vm::Throw
. Otherwise, an invalid url would panic and crash the rust program. I don't know how neon reacts to this but it is most likely not intended.