Why does getopts::Matches::opts_present() take an array of heap allocated
strings? Unless I'm missing something, it doesn't seem like it needs to:
https://github.com/mozilla/rust/blob/7d76d0ad44e1ec203d235f22eb3514247b8cbfe5/src/libgetopts/lib.rs#L302

Currently, my code to use it looks like this:

if matches.opts_present(["b".to_owned(), "x".to_owned(), "s".to_owned(),
"w".to_owned()]) { /* */ }

1. Should the function be converted to take a list of borrowed strings?
2. Regardless of what this function should take as an argument, is the way
I'm constructing a list of StrBufs the correct way to do it? It seems a bit
verbose.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to