Re: [PATCH v4 5/7] rust: alloc: add Vec::retain
From: Miguel Ojeda
Date: Fri May 02 2025 - 17:58:59 EST
On Thu, May 1, 2025 at 1:30 PM Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> I really like the way doctests implement the assert macros and how they appear
> in the kernel log compared to panics through the "real" assert ones, unwraps,
> etc.
>
> I also think that avoiding things that directly panic in doctests (i.e. example
> code) is the correct thing to do. For KUnit tests it's probably less important,
> since they don't directly serve as sample code.
I hadn't seen these earlier messages -- thanks, I am glad people like
the doctests support :)
Yeah, doing the same for `#[test]`s was planned (see PR), but we
decided to merge roughly what we had from the original author and then
build on top of that (Cc David).
Anyway, I sent it -- hopefully it will mean more people writing lots of tests!
https://lore.kernel.org/rust-for-linux/20250502215133.1923676-1-ojeda@xxxxxxxxxx/
Cheers,
Miguel