crypto_bigint/limb/
neg.rs

1//! Limb negation
2
3use crate::Limb;
4use num_traits::WrappingNeg;
5
6impl Limb {
7    /// Perform wrapping negation.
8    #[inline(always)]
9    pub const fn wrapping_neg(self) -> Self {
10        Limb(self.0.wrapping_neg())
11    }
12}
13
14impl WrappingNeg for Limb {
15    #[inline]
16    fn wrapping_neg(&self) -> Self {
17        Self(self.0.wrapping_neg())
18    }
19}