fastnum/decimal/udec/impls/
ord.rs

1use core::cmp::Ordering;
2
3use crate::decimal::UnsignedDecimal;
4
5impl<const N: usize> PartialOrd for UnsignedDecimal<N> {
6    #[inline]
7    fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
8        Some(core::cmp::Ord::cmp(self, rhs))
9    }
10}
11
12impl<const N: usize> Ord for UnsignedDecimal<N> {
13    #[inline]
14    fn cmp(&self, rhs: &Self) -> Ordering {
15        self.cmp(rhs)
16    }
17}