murarth / gumdrop

Rust option parser with custom derive support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ErrorKind can't be retrieved

LoganDark opened this issue · comments

I don't like the style of this crate's error messages ("unexpected free argument" vs "too many arguments") so I wanted to rewrite the error messages myself by catching errors and matching on them. However, once I obtain an Error struct, I can't actually extract the kind out of it because it's private and there's no getter!

:(

In addition to that, since Error doesn't have any Eq implementation it's impossible to test errors at all, I'd like to have my binary give out the help text if no command is provided but that's currently impossible