std_ext/option/
string.rs

1pub trait OptionStringExt {
2    fn as_str(&self) -> &str;
3}
4
5impl OptionStringExt for Option<String> {
6    fn as_str(&self) -> &str {
7        self.as_deref().unwrap_or_default()
8    }
9}