Open TimeEngineer opened 2 years ago
Arithmetic operations in rust can panic (overflow, division by zero, etc...)
In release mode, arithmetic operations will act like C, in modular arithmetic
Many alternatives are exposed in std lib:
These numeric values are also exposed to user input (network for example)
?
~Could you provide more information on what this isssue is ?~
What should we do about that ?
My guess is we should ban non-checked arithmetic as much as possible, is there e.g. a clippy rule to enforce this ?
Observation
Arithmetic operations in rust can panic (overflow, division by zero, etc...)
In release mode, arithmetic operations will act like C, in modular arithmetic
Many alternatives are exposed in std lib:
These numeric values are also exposed to user input (network for example)
What to do
?