We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae5776d commit 857d58dCopy full SHA for 857d58d
1 file changed
src/traits.rs
@@ -110,12 +110,12 @@ impl FirstChars for str {
110
}
111
112
/// Trait that provides a single method to get the first `N` "Unicode Scalar Values" from a string slice.
113
-#[cfg(any(feature = "espflash", feature = "macros"))]
+#[cfg(feature = "macros")]
114
pub trait StrAsOption {
115
/// If the string slice refers to an empty slice, return `None`, otherwise return the contained string.
116
fn as_option(&self) -> Option<&str>;
117
118
119
impl StrAsOption for str {
120
fn as_option(&self) -> Option<&str> {
121
if self.is_empty() { None } else { Some(self) }
0 commit comments