From 5e460470f6ea2ce31a403b6e936ec2fe8f45312a Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 19 Jul 2026 00:22:23 +0800 Subject: feat: migrate mingling-specific picker code into mingling crate BREAKING CHANGE: Remove `mingling_support` feature from arg-picker crate. The `EntryPicker` trait and `corebind` module are now part of the mingling crate directly, and `build_pattern1` is now a public method. --- arg_picker/src/picker.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'arg_picker/src/picker.rs') diff --git a/arg_picker/src/picker.rs b/arg_picker/src/picker.rs index 7a60e16..f31a5b6 100644 --- a/arg_picker/src/picker.rs +++ b/arg_picker/src/picker.rs @@ -158,6 +158,15 @@ impl<'a> IntoIterator for &'a PickerArgs<'a> { } } +impl<'a, Route> From> for Picker<'a, Route> { + fn from(args: PickerArgs<'a>) -> Self { + Picker { + route_phantom: PhantomData, + args, + } + } +} + impl<'a, Route> From<&'a [&'a str]> for Picker<'a, Route> { fn from(value: &'a [&'a str]) -> Self { Picker { @@ -428,10 +437,9 @@ impl<'a> IntoPicker<'a> for Vec { } } -// Private helper: shared construction logic for `PickerPattern1`. -// Both `Picker::pick` and `IntoPicker::pick` delegate to this. impl<'a, Route> Picker<'a, Route> { - pub(crate) fn build_pattern1( + /// Build the PickerPattern via Arguments + pub fn build_pattern1( args: PickerArgs<'a>, arg: &'a PickerArg<'a, N>, error_route: Option, -- cgit