ruplicity icon indicating copy to clipboard operation
ruplicity copied to clipboard

Use saturating_sub

Open mbrt opened this issue 9 years ago • 0 comments

There are a bunch of if a > b { a - b } else { 0 } occurrences. This could be easily solved by using a.saturating_sub(b) if the variables are unsigned.

mbrt avatar Oct 31 '16 20:10 mbrt