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/src/setups/picker | |
| 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/src/setups/picker')
| -rw-r--r-- | mingling/src/setups/picker/basic.rs | 5 | ||||
| -rw-r--r-- | mingling/src/setups/picker/structural_renderer.rs | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/mingling/src/setups/picker/basic.rs b/mingling/src/setups/picker/basic.rs index 438ed40..76b7857 100644 --- a/mingling/src/setups/picker/basic.rs +++ b/mingling/src/setups/picker/basic.rs @@ -1,8 +1,9 @@ // Doc Not Optimize use arg_picker::{PickerArg, value::Flag}; use mingling_core::{ - ConfirmationMode, ErrorOutput, InteractionMode, Program, ProgramCollect, RenderOutput, - YesAssumption, setup::ProgramSetup, + Program, ProgramCollect, + config::{ConfirmationMode, ErrorOutput, InteractionMode, RenderOutput, YesAssumption}, + setup::ProgramSetup, }; use crate::{ diff --git a/mingling/src/setups/picker/structural_renderer.rs b/mingling/src/setups/picker/structural_renderer.rs index bd9b401..998fa16 100644 --- a/mingling/src/setups/picker/structural_renderer.rs +++ b/mingling/src/setups/picker/structural_renderer.rs @@ -48,27 +48,27 @@ where fn setup(self, program: &mut Program<C>) { #[cfg(feature = "json_serde_fmt")] if program.pick_flag(&crate::consts::JSON_FLAG) { - program.structural_renderer_name = crate::StructuralRendererSetting::Json; + program.structural_renderer_name = crate::config::StructuralRendererSetting::Json; } #[cfg(feature = "json_serde_fmt")] if program.pick_flag(&crate::consts::JSON_PRETTY_FLAG) { - program.structural_renderer_name = crate::StructuralRendererSetting::JsonPretty; + program.structural_renderer_name = crate::config::StructuralRendererSetting::JsonPretty; } #[cfg(feature = "yaml_serde_fmt")] if program.pick_flag(&crate::consts::YAML_FLAG) { - program.structural_renderer_name = crate::StructuralRendererSetting::Yaml; + program.structural_renderer_name = crate::config::StructuralRendererSetting::Yaml; } #[cfg(feature = "toml_serde_fmt")] if program.pick_flag(&crate::consts::TOML_FLAG) { - program.structural_renderer_name = crate::StructuralRendererSetting::Toml; + program.structural_renderer_name = crate::config::StructuralRendererSetting::Toml; } #[cfg(feature = "ron_serde_fmt")] if program.pick_flag(&crate::consts::RON_FLAG) { - program.structural_renderer_name = crate::StructuralRendererSetting::Ron; + program.structural_renderer_name = crate::config::StructuralRendererSetting::Ron; } #[cfg(feature = "ron_serde_fmt")] if program.pick_flag(&crate::consts::RON_PRETTY_FLAG) { - program.structural_renderer_name = crate::StructuralRendererSetting::RonPretty; + program.structural_renderer_name = crate::config::StructuralRendererSetting::RonPretty; } } } |
