Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
-
5
-
Iteration Echidna
Description
bson crate requires to have a partial ord trait. This will be very tricky when comparing exponents and significands as numbers like `1x10^3` is equal to `1x10^2`. Good example of comparison logic is in the Java Implementation: https://github.com/mongodb/mongo-csharp-driver/blob/v2.8.1/src/MongoDB.Bson/ObjectModel/Decimal128.cs#L1901
PartialOrd implementation example:
impl PartialOrd for Person { fn partial_cmp(&self, other: &Person) -> Option<Ordering> { Some(self.cmp(other))
}
}