Re: [PATCH] rust: alloc: add doc test for `Vec::extend_with` and fix comment

Alexandre Courbot
2026-04-25T06:33:05Z

Hello Hsiu,

On Sat Apr 25, 2026 at 3:08 PM JST, Hsiu Che Yu wrote:
> Add a doc test for `Vec::extend_with` demonstrating basic usage and the
> zero-length case.
>
> Also fix an incorrect operator in the SAFETY comment, changing `<` to `<=`,
> since `Vec::reserve` guarantees capacity for exactly n additional elements,
> so the equal case should be included.

As per the guidelines [1], "A patch should do one thing and one thing
only".

These should be two separate patches.

[1] https://kernelnewbies.org/PatchSeries