pub fn cond_option<T>(option: Option<T>) -> Cond<T>
Conditionally writes an Option.
Option
This is has the same behavior as concat(option) without the Clone requirement.
concat(option)
Clone
assert_eq!(fmty::cond_option(Some("hola")).to_string(), "hola"); assert_eq!(fmty::cond_option(None::<&str>).to_string(), "");