From 4094865116fb4c8c21ccfd0d03312a9e3a9dd926 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 23 Mar 2025 09:53:38 +0100 Subject: [PATCH] Remove Not impls for WeekdaySet and Weekday --- src/weekday_set.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/weekday_set.rs b/src/weekday_set.rs index 159408f3..39568827 100644 --- a/src/weekday_set.rs +++ b/src/weekday_set.rs @@ -1,7 +1,6 @@ use core::{ fmt::{self, Debug}, iter::FusedIterator, - ops::Not, }; use crate::Weekday; @@ -419,28 +418,12 @@ impl fmt::Display for WeekdaySet { } } -impl Not for WeekdaySet { - type Output = Self; - - fn not(self) -> Self::Output { - Self(self.0 ^ 0b0111_1111) - } -} - impl FromIterator for WeekdaySet { fn from_iter>(iter: T) -> Self { iter.into_iter().map(Self::single).fold(Self::EMPTY, Self::union) } } -impl Not for Weekday { - type Output = WeekdaySet; - - fn not(self) -> Self::Output { - !WeekdaySet::single(self) - } -} - #[cfg(test)] mod tests { use crate::Weekday; @@ -475,13 +458,6 @@ mod tests { } } - #[test] - fn not_operation_preserves_8th_bit_invariant() { - for days in WeekdaySet::iter_all() { - assert_8th_bit_invariant(!days); - } - } - /// Test `split_at` on all possible arguments. #[test] fn split_at_is_equivalent_to_iterating() {