Skip to content
Snippets Groups Projects

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading