I can understand your library not being designed to handle arguments that are not valid unicode (which are possible on UNIX, and can be valid filenames, but heh), however having your library panic the calling thread is not cool. Please consider using Result instead of crashing.
Reproduce:
echo -e 'r\xE9mi' | xargs target/debug/myprogramusingclap
(note that you can't use cargo run, it can't handle unicode either (but at least it doesn't panic))
Similar to rust-lang/getopts#30; I'm still looking for a safe argument-parsing library 😢
I can understand your library not being designed to handle arguments that are not valid unicode (which are possible on UNIX, and can be valid filenames, but heh), however having your library panic the calling thread is not cool. Please consider using Result instead of crashing.
Reproduce:
(note that you can't use
cargo run, it can't handle unicode either (but at least it doesn't panic))Similar to rust-lang/getopts#30; I'm still looking for a safe argument-parsing library 😢