summaryrefslogtreecommitdiff
path: root/src/model/collapse.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-26 13:25:14 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-26 13:26:31 +0200
commitf7c67cde72e6a67f45180856b332bae9863243bd (patch)
tree09b1a40e17b2f8aa0c3661ac989a40840cea1f12 /src/model/collapse.rs
parent09aabc3a21e403e0b09a6d6ba517e34a303b217c (diff)
New document & flow building
Diffstat (limited to 'src/model/collapse.rs')
-rw-r--r--src/model/collapse.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/model/collapse.rs b/src/model/collapse.rs
index 18cfae8b..17933fe8 100644
--- a/src/model/collapse.rs
+++ b/src/model/collapse.rs
@@ -29,6 +29,11 @@ impl<'a, T> CollapsingBuilder<'a, T> {
}
}
+ /// Whether the builder is empty.
+ pub fn is_empty(&self) -> bool {
+ self.builder.is_empty() && self.staged.is_empty()
+ }
+
/// Can only exist when there is at least one supportive item to its left
/// and to its right, with no destructive items or weak items in between to
/// its left and no destructive items in between to its right. There may be