Skip to main content

crypto_bigint/limb/
bit_not.rs

1//! Limb bit not operations.
2
3use super::Limb;
4use core::ops::Not;
5
6impl Limb {
7    /// Calculates `!a`.
8    #[inline(always)]
9    #[must_use]
10    pub const fn not(self) -> Self {
11        Limb(!self.0)
12    }
13}
14
15impl Not for Limb {
16    type Output = Limb;
17
18    fn not(self) -> <Self as Not>::Output {
19        self.not()
20    }
21}