mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Add ListView::is_empty
This commit is contained in:
parent
cba8d53cf2
commit
ffe5b57749
@ -66,6 +66,14 @@ impl ListView {
|
|||||||
self.children.len()
|
self.children.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns `true` if this view contains no children.
|
||||||
|
///
|
||||||
|
/// Returns `false` if at least a delimiter or a view is present.
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.children.is_empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Returns a reference to the children
|
/// Returns a reference to the children
|
||||||
pub fn children(&self) -> &[ListChild] {
|
pub fn children(&self) -> &[ListChild] {
|
||||||
&self.children[..]
|
&self.children[..]
|
||||||
|
Loading…
Reference in New Issue
Block a user