builtin random: make option parsing consistent with other builtins again

As suggested in a comment on2fb352a9e (Address some clippy lints from nightly
clippy, 2023-10-03).
This commit is contained in:
Johannes Altmanninger 2023-10-07 19:59:28 +02:00
parent 86803e4442
commit e8712af0c3

View file

@ -21,7 +21,8 @@ pub fn random(
const longopts: &[woption] = &[wopt(L!("help"), woption_argument_t::no_argument, 'h')];
let mut w = wgetopter_t::new(shortopts, longopts, argv);
if let Some(c) = w.wgetopt_long() {
#[allow(clippy::never_loop)]
while let Some(c) = w.wgetopt_long() {
match c {
'h' => {
builtin_print_help(parser, streams, cmd);