Skip to content

Commit 9d86f66

Browse files
s3bkpcwalton
authored andcommitted
Add a new Outline::len() method
1 parent e5eee41 commit 9d86f66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

content/src/outline.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ impl Outline {
238238
self.contours.iter().all(Contour::is_empty)
239239
}
240240

241+
/// Returns the number of contours in this outline.
242+
#[inline]
243+
pub fn len(&self) -> usize {
244+
self.contours.len()
245+
}
246+
241247
/// Appends the contours in another outline to this one.
242248
pub fn push_outline(&mut self, other: Outline) {
243249
if other.is_empty() {

0 commit comments

Comments
 (0)