fastnum2 0.3.2

fork of Fast decimal numbers library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::cmp::Ordering;

use crate::decimal::UnsignedDecimal;

impl<const N: usize> PartialOrd for UnsignedDecimal<N> {
    #[inline]
    fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
        Some(std::cmp::Ord::cmp(self, rhs))
    }
}

impl<const N: usize> Ord for UnsignedDecimal<N> {
    #[inline]
    fn cmp(&self, rhs: &Self) -> Ordering {
        self.cmp(rhs)
    }
}