Skip to content

Better handling of integer overflows

Samanta Navarro requested to merge ferivoz/arti:integers into main

Integers could overflow and this is an error in Rust.

Handle integer additions carefully:

  • Overflowing time is more or less infinity, i.e. use never
  • Stop counting errors if more than usize::MAX were encountered

Both cases probably never happen, I hope.

Merge request reports

Loading