diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-14 17:47:15 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-14 18:02:09 +0800 |
| commit | 9c8fe13c2629a4318bd12815c07cef1371ba85a2 (patch) | |
| tree | 9e9af625832a1f872f5523dbf9d9730af0ef90c8 /mingling_macros | |
| parent | f3c134615c56dc7372e47a216dddca72250a3308 (diff) | |
feat(core): move config types to public config module
Refactor program configuration types into a dedicated public `config`
module under `mingling_core`, making `StructuralRendererSetting`
accessible via `mingling_core::config` instead of the crate root.
Update all internal references and setup modules to use the new
`config::` path convention.
Diffstat (limited to 'mingling_macros')
| -rw-r--r-- | mingling_macros/src/attr/dispatcher_clap.rs | 4 | ||||
| -rw-r--r-- | mingling_macros/src/func/program_final_gen.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mingling_macros/src/attr/dispatcher_clap.rs b/mingling_macros/src/attr/dispatcher_clap.rs index 88117e6..9aa7779 100644 --- a/mingling_macros/src/attr/dispatcher_clap.rs +++ b/mingling_macros/src/attr/dispatcher_clap.rs @@ -154,7 +154,7 @@ pub(crate) fn dispatcher_clap_attr(attr: TokenStream, item: TokenStream) -> Toke let this = ::mingling::this::<#program_path>(); match this.stdout_setting.clap_help_print_behaviour { - ::mingling::ClapHelpPrintBehaviour::WriteToRenderResult => { + ::mingling::config::ClapHelpPrintBehaviour::WriteToRenderResult => { let mut cmd = <#struct_name as ::clap::CommandFactory>::command() .color(ColorChoice::Always); let styled = cmd.render_help(); @@ -162,7 +162,7 @@ pub(crate) fn dispatcher_clap_attr(attr: TokenStream, item: TokenStream) -> Toke let _ = write!(result, "{}", styled.ansi()); result } - ::mingling::ClapHelpPrintBehaviour::PrintDirectly => { + ::mingling::config::ClapHelpPrintBehaviour::PrintDirectly => { let mut command = <#struct_name as ::clap::CommandFactory>::command(); command.print_help().unwrap(); ::mingling::RenderResult::new() diff --git a/mingling_macros/src/func/program_final_gen.rs b/mingling_macros/src/func/program_final_gen.rs index 7c18736..25bca5e 100644 --- a/mingling_macros/src/func/program_final_gen.rs +++ b/mingling_macros/src/func/program_final_gen.rs @@ -101,7 +101,7 @@ pub(crate) fn program_final_gen_impl(_input: TokenStream) -> TokenStream { let structural_render = quote! { fn structural_render( any: ::mingling::AnyOutput<Self::Enum>, - setting: &::mingling::StructuralRendererSetting, + setting: &::mingling::config::StructuralRendererSetting, ) -> Result<::mingling::RenderResult, ::mingling::error::StructuralRendererSerializeError> { match any.member_id() { #(#structural_renderer_tokens)* |
