Skip to content

Commit 5e0bb2d

Browse files
committed
add Weekdays::to_vec
1 parent fe50a19 commit 5e0bb2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/weekdays.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,12 @@ impl Weekdays {
368368
WeekdaysIterFrom { days: self, start }
369369
}
370370

371+
/// Convert the collection into a `Vec<Weekday>`.
372+
#[cfg(feature = "std")]
373+
pub fn to_vec(self) -> Vec<Weekday> {
374+
self.iter().collect()
375+
}
376+
371377
/// Iterate over all 128 possible sets, from `EMPTY` to `ALL`.
372378
pub fn iter_all() -> impl Iterator<Item = Self> {
373379
(0b0000_0000..0b1000_0000).map(Self)

0 commit comments

Comments
 (0)