Adds SelectView::is_empty

Fix clippy warning
This commit is contained in:
Alexandre Bury 2016-09-21 11:57:38 -07:00
parent a064400b6f
commit f879305d7f

View File

@ -260,6 +260,11 @@ impl<T: 'static> SelectView<T> {
self.items.len()
}
/// Returns `true` if this list has no item.
pub fn is_empty(&self) -> bool {
self.items.is_empty()
}
fn focus(&self) -> usize {
self.focus.get()
}