mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
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:
parent
86803e4442
commit
e8712af0c3
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue