Re: Re: [PATCH v4 5/7] rust: alloc: add Vec::retain
From: Miguel Ojeda
Date: Fri May 02 2025 - 10:13:34 EST
On Wed, 30 Apr 2025 18:26:05 +0200 Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> Can we have this return a Result, like doctests can do?
>
> Don't we have macros around kunit_assert!() and kunit_assert_eq() outside of
> doctests (i.e. dedicated kunit tests)?
The initial KUnit `#[test]` support that landed was very basic:
https://lore.kernel.org/rust-for-linux/20250330170535.546869-1-ojeda@xxxxxxxxxx/
The missing `assert*!`s support is definitely annoying. I took a quick look,
and it is not too bad to add the support. The `Result` is then easy on top too.
So I will send the support for both already since I suspect others will hit this
quite soon.
I hope that helps.
Cheers,
Miguel