summaryrefslogtreecommitdiffstats
path: root/third_party/rust/rust_decimal/src/ops.rs
blob: 6bda140e892550b962e331c29d0bacbfcd282658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This code (in fact, this library) is heavily inspired by the dotnet Decimal number library
// implementation. Consequently, a huge thank you for to all the contributors to that project
// whose work has also inspired the solutions found here.

pub(crate) mod array;

#[cfg(feature = "legacy-ops")]
mod legacy;
#[cfg(feature = "legacy-ops")]
pub(crate) use legacy::{add_impl, cmp_impl, div_impl, mul_impl, rem_impl, sub_impl};

#[cfg(not(feature = "legacy-ops"))]
mod add;
#[cfg(not(feature = "legacy-ops"))]
mod cmp;
#[cfg(not(feature = "legacy-ops"))]
pub(in crate::ops) mod common;
#[cfg(not(feature = "legacy-ops"))]
mod div;
#[cfg(not(feature = "legacy-ops"))]
mod mul;
#[cfg(not(feature = "legacy-ops"))]
mod rem;

#[cfg(not(feature = "legacy-ops"))]
pub(crate) use add::{add_impl, sub_impl};
#[cfg(not(feature = "legacy-ops"))]
pub(crate) use cmp::cmp_impl;
#[cfg(not(feature = "legacy-ops"))]
pub(crate) use div::div_impl;
#[cfg(not(feature = "legacy-ops"))]
pub(crate) use mul::mul_impl;
#[cfg(not(feature = "legacy-ops"))]
pub(crate) use rem::rem_impl;