Closed kod-kristoff closed 5 months ago
That's because the help and version text is compiled as static strings in the trait: https://github.com/parasyte/onlyargs/blob/f331a2ecea9a64830dd59d0996846bbd857baaed/src/lib.rs#L57-L72 This gives you a fallback when the implementation doesn't provide the help/version text, but it's of course incorrect.
It might be better to remove the fallback and require the impl to provide both strings.
When using
onlyargs-derive
the problem only happens for--version
.
This was an oversight, but it's very easy to fix.
Hi!
First, thanks for a great crate!
But when trying it here I noticed that checking the version returns this:
and not as expected
onlyargs-tutorial-plain v0.1.0
.If
HELP
isn't overriden, then--help
also fails.When using
onlyargs-derive
the problem only happens for--version
.