9

Github Stabilize `unsigned_abs` by jhpratt · Pull Request #80959 · rust-lang/rus...

 4 years ago
source link: https://github.com/rust-lang/rust/pull/80959
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Contributor

jhpratt commented 18 days ago

Resolves #74913.

This PR stabilizes the i*::unsigned_abs() method, which returns the absolute value of an integer as its unsigned equivalent. This has the advantage that it does not overflow on i*::MIN.

I have gone ahead and used this in a couple locations throughout the repository.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK