From 11adad7db1b6202d5366527902c3f0a9fb90654f Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 24 May 2026 16:46:45 +0800 Subject: Move entry, route, and program_setup macros to extra_macros feature Remove these macros from the prelude and gate them behind the `extra_macros` feature flag. Update examples and documentation to enable the new feature where these macros are used. --- examples/example-argument-parse/Cargo.toml | 2 +- examples/example-custom-pickable/Cargo.toml | 4 +--- examples/example-setup/Cargo.toml | 2 +- examples/example-unit-test/Cargo.toml | 2 +- examples/example-unit-test/src/main.rs | 1 + 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/example-argument-parse/Cargo.toml b/examples/example-argument-parse/Cargo.toml index 3b06523..89f7544 100644 --- a/examples/example-argument-parse/Cargo.toml +++ b/examples/example-argument-parse/Cargo.toml @@ -7,4 +7,4 @@ edition = "2024" path = "../../mingling" # Enable `parser` features -features = ["parser"] +features = ["parser", "extra_macros"] diff --git a/examples/example-custom-pickable/Cargo.toml b/examples/example-custom-pickable/Cargo.toml index ca97c4a..9102c21 100644 --- a/examples/example-custom-pickable/Cargo.toml +++ b/examples/example-custom-pickable/Cargo.toml @@ -6,6 +6,4 @@ edition = "2024" [dependencies.mingling] path = "../../mingling" -features = [ - "parser", -] +features = ["parser", "extra_macros"] diff --git a/examples/example-setup/Cargo.toml b/examples/example-setup/Cargo.toml index 12364aa..a340c91 100644 --- a/examples/example-setup/Cargo.toml +++ b/examples/example-setup/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2024" [dependencies] -mingling = { path = "../../mingling" } +mingling = { path = "../../mingling", features = ["extra_macros"] } diff --git a/examples/example-unit-test/Cargo.toml b/examples/example-unit-test/Cargo.toml index 4a82503..cc9a1a2 100644 --- a/examples/example-unit-test/Cargo.toml +++ b/examples/example-unit-test/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2024" [dependencies] -mingling = { path = "../../mingling" } +mingling = { path = "../../mingling", features = ["extra_macros"] } diff --git a/examples/example-unit-test/src/main.rs b/examples/example-unit-test/src/main.rs index d0e1b90..ca7ac25 100644 --- a/examples/example-unit-test/src/main.rs +++ b/examples/example-unit-test/src/main.rs @@ -11,6 +11,7 @@ use mingling::prelude::*; #[cfg(test)] mod tests { use super::*; + use mingling::macros::entry; use mingling::{assert_member_id, assert_render_result}; // --------- IMPORTANT --------- -- cgit