From e6136f22cff446b16dbebf3b26a6fdea6dbc0e83 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 17 Jul 2026 09:14:07 +0800 Subject: docs: enable doc-test linting for prelude and parser modules Convert ```` ```ignore ```` to working doc-tests or remove non-compilable examples --- mingling_picker/src/lib.rs | 2 +- mingling_picker/src/parselib/style.rs | 4 ++-- mingling_picker/src/picker/patterns.rs | 32 -------------------------------- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/mingling_picker/src/lib.rs b/mingling_picker/src/lib.rs index 0ade673..deb266e 100644 --- a/mingling_picker/src/lib.rs +++ b/mingling_picker/src/lib.rs @@ -25,7 +25,7 @@ pub mod value; /// /// This module is intended to be imported with a wildcard import: /// -/// ```ignore +/// ``` /// use mingling_picker::prelude::*; /// ``` pub mod prelude { diff --git a/mingling_picker/src/parselib/style.rs b/mingling_picker/src/parselib/style.rs index 3c37b2d..dd01125 100644 --- a/mingling_picker/src/parselib/style.rs +++ b/mingling_picker/src/parselib/style.rs @@ -39,8 +39,8 @@ impl<'a> ParserStyle<'a> { /// /// # Examples /// - /// ```ignore - /// use mingling_picker::parselib::{ParserStyle, FlagStr, UNIX_STYLE}; + /// ``` + /// # use mingling_picker::parselib::{ParserStyle, FlagStr, UNIX_STYLE}; /// let style = &UNIX_STYLE; /// /// assert_eq!(style.flag_string('v'), "-v"); diff --git a/mingling_picker/src/picker/patterns.rs b/mingling_picker/src/picker/patterns.rs index 8bdddde..78ae2b0 100644 --- a/mingling_picker/src/picker/patterns.rs +++ b/mingling_picker/src/picker/patterns.rs @@ -30,11 +30,6 @@ internal_repeat!(1..=32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick(&my_arg) - /// .or(|| 42); - /// ``` #[allow(clippy::type_complexity)] pub fn or(mut self, func: F) -> Self where @@ -52,11 +47,6 @@ internal_repeat!(1..=32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick(&my_arg) - /// .or_default(); - /// ``` #[allow(clippy::type_complexity)] pub fn or_default(mut self) -> Self where @@ -73,11 +63,6 @@ internal_repeat!(1..=32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick(&my_arg) - /// .or_route(|| Redirect::home()); - /// ``` pub fn or_route(mut self, func: F) -> Self where F: FnMut() -> Route, @@ -122,11 +107,6 @@ internal_repeat!(1..=32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick(&my_arg) - /// .post(|val| val * 2); - /// ``` #[allow(clippy::type_complexity)] pub fn post(mut self, func: F) -> Self where @@ -182,10 +162,6 @@ internal_repeat!(1..32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick_or(&my_arg, || 42); - /// ``` #[allow(clippy::type_complexity)] pub fn pick_or(self, arg: impl Into<&'a PickerArg<'a, N>>, func: F) -> PickerPattern$+<'a, (T$,+), N, Route> where @@ -202,10 +178,6 @@ internal_repeat!(1..32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick_or_default(&my_arg); - /// ``` #[allow(clippy::type_complexity)] pub fn pick_or_default(self, arg: impl Into<&'a PickerArg<'a, N>>) -> PickerPattern$+<'a, (T$,+), N, Route> where @@ -220,10 +192,6 @@ internal_repeat!(1..32 => { /// /// # Example /// - /// ```ignore - /// let pattern = picker - /// .pick_or_route(&my_arg, || Redirect::home()); - /// ``` #[allow(clippy::type_complexity)] pub fn pick_or_route(self, arg: impl Into<&'a PickerArg<'a, N>>, func: F) -> PickerPattern$+<'a, (T$,+), N, Route> where -- cgit