vk-rs
vk-rs copied to clipboard
panic when "API Constants" uses `alias` instead of value
The parser fails, if the vk.xml
has an enum without value
-attribute. It can't parse the alias
. Happens in vk.xml v1.1.70
Edit: You never handle any alias-names
Edit: To be honest, your error handling is horrible and you should consider using rustfmt
It looks like aliases were only just added in 1.1.70
, so there wasn't much consideration for them when this library was originally written. I feel like, for now, the simplest solution would be to add code that ignores alias-only variants, to get 1.1.70
compiling in lieu of more comprehensive alias handling.
Also, I'm pretty sure I used panics exclusively because making custom error types is a pain, the ?
operator wasn't stable, and this is intended for use in build scripts where there isn't much you can do to recover from an error of this type.