It would be great to have saturating_abs and saturating_neg functions for signed integer types. The current work-around is using a pattern like checked_$opr().unwrap_or($typ::max_value()) but having explicit functions would lift the corner-case knowledge "burden" from the user.
It would be great to have
saturating_absandsaturating_negfunctions for signed integer types. The current work-around is using a pattern likechecked_$opr().unwrap_or($typ::max_value())but having explicit functions would lift the corner-case knowledge "burden" from the user.