On Wed Aug 5, 2026 at 2:44 PM JST, Eliot Courtney wrote:
> Add `shr_exact` in the vein of `try_shrink` which shifts a bounded right
> only if it loses no set bits. This is useful for getting a shifted down
> integer while simultaneously checking that it's aligned.
>
> Signed-off-by: Eliot Courtney <[email protected]>

Maybe it is worth briefly mentioning that an equivalent method exists in
the standard library (in nightly) for primitive types [1].

With the missing `#[inline]` mentioned by Sashiko fixed,

Acked-by: Alexandre Courbot <[email protected]>

[1] https://doc.rust-lang.org/std/primitive.u32.html#method.shr_exact

Reply via email to