From e8712af0c3cdd5f0e3bc4368ee9ce9652e360d4e Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 7 Oct 2023 19:59:28 +0200 Subject: [PATCH] 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). --- fish-rust/src/builtins/random.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fish-rust/src/builtins/random.rs b/fish-rust/src/builtins/random.rs index 76b33d9c8..ba4bfe890 100644 --- a/fish-rust/src/builtins/random.rs +++ b/fish-rust/src/builtins/random.rs @@ -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);