pub fn non_empty<T: ?Sized + IsEmpty>(value: &T) -> boolExpand description
False if the value is “empty”
Shortcut for |x|{ !empty(x) }.
Example:
use tool::non_empty;
let strings: Vec<_> = vec!["my string", "", "asdf", ""]
.into_iter()
.filter(non_empty)
.collect();
assert_eq!(strings, vec!["my string", "asdf"]);