aboutsummaryrefslogtreecommitdiff
path: root/mingling_picker
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-17 09:14:07 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-17 09:14:07 +0800
commite6136f22cff446b16dbebf3b26a6fdea6dbc0e83 (patch)
tree60441ec388fb5ef6394c33a6a1a8f5f9883bceba /mingling_picker
parented4b8dfc825b59012ad850d6c88067e7007962a2 (diff)
docs: enable doc-test linting for prelude and parser modules
Convert ```` ```ignore ```` to working doc-tests or remove non-compilable examples
Diffstat (limited to 'mingling_picker')
-rw-r--r--mingling_picker/src/lib.rs2
-rw-r--r--mingling_picker/src/parselib/style.rs4
-rw-r--r--mingling_picker/src/picker/patterns.rs32
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<F>(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<F>(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<F>(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<N, F>(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<N>(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<N, F>(self, arg: impl Into<&'a PickerArg<'a, N>>, func: F) -> PickerPattern$+<'a, (T$,+), N, Route>
where