rust: str: take advantage of the `-> Result` support in KUnit `#[test]`'s
Since now we have support for returning `-> Result`s, we can convert some of these tests to use the feature, and serve as a first user for it too. Thus convert them, which allows us to remove some `unwrap()`s. We keep the actual assertions we want to make as explicit ones with `assert*!`s. Reviewed-by:David Gow <davidgow@google.com> Acked-by:
Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250502215133.1923676-6-ojeda@kernel.org [ Split the `CString` simplification into a new commit. - Miguel ] Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
Loading
Please register or sign in to comment