Skip to main content

fastnum/decimal/dec/impls/
hash.rs

1use core::hash::{Hash, Hasher};
2
3use crate::decimal::Decimal;
4
5impl<const N: usize> Hash for Decimal<N> {
6    #[inline]
7    fn hash<H: Hasher>(&self, state: &mut H) {
8        let normalized = self.reduce();
9        normalized.digits.hash(state);
10        normalized.cb.hash(state);
11    }
12}