mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
677b517e66
Add Saturating type (based on Wrapping type)
Tracking #87920
### Unresolved Questions
<!--
Include any open questions that need to be answered before the feature can be
stabilised.
-->
- [x] ~`impl Div for Saturating<T>` falls back on inner integer division - which seems alright?~
- [x] add `saturating_div`? (to respect division by `-1`)
- [x] There is no `::saturating_shl` and `::saturating_shr`. (How to) implement `Shl`, `ShlAssign`, `Shr` and `ShrAssign`?
- [naively](
|
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |