diff options
Diffstat (limited to 'mingling_core')
| -rw-r--r-- | mingling_core/Cargo.lock | 18 | ||||
| -rw-r--r-- | mingling_core/Cargo.toml | 2 | ||||
| -rw-r--r-- | mingling_core/src/program.rs | 2 | ||||
| -rw-r--r-- | mingling_core/src/program/flag.rs | 8 |
4 files changed, 12 insertions, 18 deletions
diff --git a/mingling_core/Cargo.lock b/mingling_core/Cargo.lock index 315939f..5755757 100644 --- a/mingling_core/Cargo.lock +++ b/mingling_core/Cargo.lock @@ -416,9 +416,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.12+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", @@ -426,14 +426,14 @@ dependencies = [ "toml_datetime", "toml_parser", "toml_writer", - "winnow 0.7.15", + "winnow", ] [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] @@ -444,7 +444,7 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.1", + "winnow", ] [[package]] @@ -494,12 +494,6 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" - -[[package]] -name = "winnow" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" diff --git a/mingling_core/Cargo.toml b/mingling_core/Cargo.toml index f7f7c00..54f6a2c 100644 --- a/mingling_core/Cargo.toml +++ b/mingling_core/Cargo.toml @@ -31,7 +31,7 @@ once_cell = "1.21.4" ron = { version = "0.12.1", optional = true } serde_json = { version = "1", optional = true } serde_yaml = { version = "0.9", optional = true } -toml = { version = "0.9.8", optional = true } +toml = { version = "1.1.2+spec-1.1.0", optional = true } log = { version = "0.4", optional = true } env_logger = { version = "0.11", optional = true } 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(); |
