summaryrefslogtreecommitdiffstats
path: root/vendor/crypto-bigint/src/limb/bit_not.rs
blob: 26676d5989862fa41079c429b56847e0e2bc2cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! Limb bit not operations.

use super::Limb;
use core::ops::Not;

impl Limb {
    /// Calculates `!a`.
    pub const fn not(self) -> Self {
        Limb(!self.0)
    }
}

impl Not for Limb {
    type Output = Limb;

    fn not(self) -> <Self as Not>::Output {
        self.not()
    }
}