Re: [PATCH] rust: num: clean up Bounded::__new documentation and comments
From: Miguel Ojeda
Date: Sun Jan 25 2026 - 22:14:42 EST
On Fri, Jan 23, 2026 at 2:24 PM Shivam Kalra <shivamklr@xxxxxxx> wrote:
>
> Remove the redundant paragraph in the documentation of __new now that
> the Safety section explicitly covers the requirement. Additionally,
> add an INVARIANT comment inside the function body where the Bounded
> instance is actually constructed to document that the type invariant
> is upheld.
>
> Link: https://lore.kernel.org/rust-for-linux/CANiq72mUCUh72BWP4eD1PTDpwdb1ML+Xgfom-Ys6thJooqQPwQ@xxxxxxxxxxxxxx/.
> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
> Signed-off-by: Shivam Kalra <shivamklr@xxxxxxx>
Applied to `rust-fixes` (because it cleans up the other one there) --
thanks everyone!
[ Reworded slightly. - Miguel ]
Cheers,
Miguel