Skip to content

ClockTime & Formats with an inner optional interger: add `saturating_{add,sub}` & fix `cmp`

For ClockTime and others Format(Option<{u32,u64}>) types:

  • Implement saturating_{add,sub}.
  • Fix PartialOrd which was returning true for expressions such as ClockTime::none() < ClockTime::from_seconds(1) and ClockTime::from_seconds(1) > ClockTime::none().
  • Remove Ord because these types are not a total order when it comes to an inner None.
  • Add tests.
Edited by François Laignel

Merge request reports

Loading