We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03d6850 commit 7b1eac7Copy full SHA for 7b1eac7
src/weekdays.rs
@@ -102,8 +102,8 @@ impl Weekdays {
102
/// assert_eq!((Weekdays::MON | Weekdays::WED | Weekdays::FRI).len(), 3);
103
/// assert_eq!(Weekdays::ALL.len(), 7);
104
/// ```
105
- pub const fn len(self) -> usize {
106
- self.0.count_ones() as usize
+ pub const fn len(self) -> u8 {
+ self.0.count_ones() as u8
107
}
108
/// Returns `true` if the set is empty.
109
///
@@ -291,7 +291,7 @@ impl DoubleEndedIterator for WeekdaysIter {
291
292
impl ExactSizeIterator for WeekdaysIter {
293
fn len(&self) -> usize {
294
- self.0.len()
+ self.0.len().into()
295
296
297
impl FusedIterator for WeekdaysIter {}
0 commit comments