diff options
Diffstat (limited to 'mingling_core/src')
| -rw-r--r-- | mingling_core/src/program.rs | 2 | ||||
| -rw-r--r-- | mingling_core/src/program/flag.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs index cf8b06c..bee9772 100644 --- a/mingling_core/src/program.rs +++ b/mingling_core/src/program.rs @@ -257,7 +257,7 @@ macro_rules! __dispatch_program_chains { }; } -// Get all registered dispatcher names from the program +/// Get all registered dispatcher names from the program pub fn get_nodes<C: ProgramCollect<Enum = G>, G: Display>( program: &Program<C, G>, ) -> Vec<(String, &(dyn Dispatcher<G> + Send + Sync))> { diff --git a/mingling_core/src/program/flag.rs b/mingling_core/src/program/flag.rs index ba3376c..f44cf33 100644 --- a/mingling_core/src/program/flag.rs +++ b/mingling_core/src/program/flag.rs @@ -480,9 +480,9 @@ where G: Display, { /// Registers a global argument (with value) and its handler. - pub fn global_argument<F, A>(&mut self, arguments: A, do_fn: F) + pub fn global_argument<F, A>(&mut self, arguments: A, mut do_fn: F) where - F: Fn(&mut Program<C, G>, String), + F: FnMut(&mut Program<C, G>, String), A: Into<Flag>, { let flag = arguments.into(); @@ -496,9 +496,9 @@ where } /// Registers a global flag (boolean) and its handler. - pub fn global_flag<F, A>(&mut self, flag: A, do_fn: F) + pub fn global_flag<F, A>(&mut self, flag: A, mut do_fn: F) where - F: Fn(&mut Program<C, G>), + F: FnMut(&mut Program<C, G>), A: Into<Flag>, { let flag = flag.into(); |
