Skip to content

Commit

Permalink
fix(complete): Loosen requirements on Command factory
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 2, 2024
1 parent f40b37f commit 4af0cd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clap_complete/src/env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub struct CompleteEnv<'s, F> {
shells: Shells<'s>,
}

impl<'s, F: FnOnce() -> clap::Command> CompleteEnv<'s, F> {
impl<'s, F: Fn() -> clap::Command> CompleteEnv<'s, F> {
/// Complete a [`clap::Command`]
///
/// # Example
Expand Down Expand Up @@ -174,7 +174,7 @@ impl<'s, F: FnOnce() -> clap::Command> CompleteEnv<'s, F> {
}
}

impl<'s, F: FnOnce() -> clap::Command> CompleteEnv<'s, F> {
impl<'s, F: Fn() -> clap::Command> CompleteEnv<'s, F> {
/// Process the completion request and exit
///
/// **Warning:** `stdout` should not be written to before this has had a
Expand Down

0 comments on commit 4af0cd6

Please sign in to comment.