diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-23 00:41:27 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-23 00:41:27 +0800 |
| commit | fc5cd8341e1dbe0c5c65a10813a9392cb1cd35b4 (patch) | |
| tree | 61a901c96a543a50ea62ba5fc9ac2d1f512bbabe | |
| parent | 39721a88611f47a8e02a4daeafaa34d1a2c44b34 (diff) | |
fix(docs): rename `builds` feature to `build` in examples
| -rw-r--r-- | mingling/src/example_docs.rs | 10 | ||||
| -rw-r--r-- | mingling/src/features.rs | 11 | ||||
| -rw-r--r-- | mingling_core/tests/test-all/tests/integration.rs | 2 | ||||
| -rw-r--r-- | mingling_core/tests/test-comp/tests/integration.rs | 2 |
4 files changed, 18 insertions, 7 deletions
diff --git a/mingling/src/example_docs.rs b/mingling/src/example_docs.rs index 89d5af1..35cf024 100644 --- a/mingling/src/example_docs.rs +++ b/mingling/src/example_docs.rs @@ -777,7 +777,7 @@ pub mod example_combine_pathf_dispatch_tree {} /// To make your completions work, you need to generate a completion script using Mingling's tools /// /// 1. Enable features -/// You need to enable the `builds` and `comp` features for `mingling` in `[build-dependencies]` +/// You need to enable the `build` and `comp` features for `mingling` in `[build-dependencies]` /// /// 2. Write `build.rs` /// Write the following in `build.rs` @@ -838,8 +838,8 @@ pub mod example_combine_pathf_dispatch_tree {} /// "comp", /// /// # If you want to build completion scripts, -/// # enable `builds` features -/// "builds", +/// # enable `build` features +/// "build", /// ] /// /// [workspace] @@ -2268,8 +2268,8 @@ pub mod example_panic_unwind {} /// # Enable `pathf` features /// "pathf", /// -/// # Enable the `builds` feature for build-time support -/// "builds", +/// # Enable the `build` feature for build-time support +/// "build", /// ] /// /// [workspace] diff --git a/mingling/src/features.rs b/mingling/src/features.rs index 78d6226..0dde333 100644 --- a/mingling/src/features.rs +++ b/mingling/src/features.rs @@ -20,6 +20,17 @@ pub const MINGLING_ASYNC: bool = false; #[cfg(feature = "async")] #[allow(unused)] pub const MINGLING_ASYNC: bool = true; +/// Whether the `build` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "build"))] +#[allow(unused)] +pub const MINGLING_BUILD: bool = false; + +/// Whether the `build` feature is enabled +/// Current: `enabled` +#[cfg(feature = "build")] +#[allow(unused)] +pub const MINGLING_BUILD: bool = true; /// Whether the `builds` feature is enabled /// Current: `disabled` #[cfg(not(feature = "builds"))] diff --git a/mingling_core/tests/test-all/tests/integration.rs b/mingling_core/tests/test-all/tests/integration.rs index d36b9df..acb12db 100644 --- a/mingling_core/tests/test-all/tests/integration.rs +++ b/mingling_core/tests/test-all/tests/integration.rs @@ -7,9 +7,9 @@ use mingling::StringVec; use mingling::StructuralData; use mingling::StructuralRenderer; use mingling::StructuralRendererSetting; -use mingling::comp::{ShellContext, ShellFlag, Suggest}; use mingling::core_res::ResREPL; use mingling::hook::ProgramHook; +use mingling::{ShellContext, ShellFlag, Suggest}; use serde::Serialize; use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/mingling_core/tests/test-comp/tests/integration.rs b/mingling_core/tests/test-comp/tests/integration.rs index 37aa716..5c5a9e4 100644 --- a/mingling_core/tests/test-comp/tests/integration.rs +++ b/mingling_core/tests/test-comp/tests/integration.rs @@ -1,6 +1,6 @@ use mingling::MockProgramCollect; use mingling::Program; -use mingling::comp::{ShellContext, ShellFlag, Suggest, SuggestItem}; +use mingling::{ShellContext, ShellFlag, Suggest, SuggestItem}; #[test] fn test_shell_context_parsing_full() { |
