From bac3eb328005bf1c975ab2bf1fd71b824d7a111e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 26 Sep 2022 11:13:14 -0500 Subject: [PATCH] docs: Raise visibility of 'string' feature --- src/_features.rs | 2 +- src/builder/os_str.rs | 3 +++ src/builder/str.rs | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/_features.rs b/src/_features.rs index 12d7e536..10d6163c 100644 --- a/src/_features.rs +++ b/src/_features.rs @@ -19,7 +19,7 @@ //! * **env**: Turns on the usage of environment variables during parsing. //! * **unicode**: Turns on support for unicode characters (including emoji) in arguments and help messages. //! * **wrap_help**: Turns on the help text wrapping feature, based on the terminal size. -//! * **string**: Allow runtime generated strings +//! * **string**: Allow runtime generated strings (e.g. with [`Str`][crate::builder::Str]). //! //! #### Experimental features //! diff --git a/src/builder/os_str.rs b/src/builder/os_str.rs index f379b415..ba8cd231 100644 --- a/src/builder/os_str.rs +++ b/src/builder/os_str.rs @@ -1,6 +1,9 @@ use crate::builder::Str; /// A UTF-8-encoded fixed string +/// +/// **NOTE:** To support dynamic values (i.e. `OsString`), enable the [`string` +/// feature][crate::_features] #[derive(Default, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)] pub struct OsStr { name: Inner, diff --git a/src/builder/str.rs b/src/builder/str.rs index e4750c74..75da8f08 100644 --- a/src/builder/str.rs +++ b/src/builder/str.rs @@ -1,4 +1,7 @@ /// A UTF-8-encoded fixed string +/// +/// **NOTE:** To support dynamic values (i.e. `String`), enable the [`string` +/// feature][crate::_features] #[derive(Default, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)] pub struct Str { name: Inner,