Skip to content

Commit 4af0cd6

Browse files
committed
fix(complete): Loosen requirements on Command factory
1 parent f40b37f commit 4af0cd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clap_complete/src/env/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub struct CompleteEnv<'s, F> {
9696
shells: Shells<'s>,
9797
}
9898

99-
impl<'s, F: FnOnce() -> clap::Command> CompleteEnv<'s, F> {
99+
impl<'s, F: Fn() -> clap::Command> CompleteEnv<'s, F> {
100100
/// Complete a [`clap::Command`]
101101
///
102102
/// # Example
@@ -174,7 +174,7 @@ impl<'s, F: FnOnce() -> clap::Command> CompleteEnv<'s, F> {
174174
}
175175
}
176176

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

0 commit comments

Comments
 (0)