docs: Make more resilient across rust versions

This commit is contained in:
Ed Page 2023-04-24 22:15:26 -05:00
parent 08f8d6ca30
commit cef5006e4f

View file

@ -2104,10 +2104,8 @@ pub mod via_prelude {
/// assert_eq!(format!("{:?}", parser), "ValueParser::os_string");
/// let parser = clap::value_parser!(std::path::PathBuf);
/// assert_eq!(format!("{:?}", parser), "ValueParser::path_buf");
/// let parser = clap::value_parser!(u16).range(3000..);
/// assert_eq!(format!("{:?}", parser), "RangedI64ValueParser { bounds: (Included(3000), Included(65535)), target: PhantomData }");
/// let parser = clap::value_parser!(u64).range(3000..);
/// assert_eq!(format!("{:?}", parser), "RangedU64ValueParser { bounds: (Included(3000), Unbounded), target: PhantomData }");
/// let _parser = clap::value_parser!(u16).range(3000..);
/// let _parser = clap::value_parser!(u64).range(3000..);
///
/// // FromStr types
/// let parser = clap::value_parser!(usize);
@ -2133,8 +2131,7 @@ pub mod via_prelude {
/// # }
/// # }
/// }
/// let parser = clap::value_parser!(ColorChoice);
/// assert_eq!(format!("{:?}", parser), "EnumValueParser(PhantomData)");
/// let _parser = clap::value_parser!(ColorChoice);
/// ```
#[macro_export]
macro_rules! value_parser {