Skip to content
Commit 2d6c87d0 authored by Miguel Ojeda's avatar Miguel Ojeda
Browse files

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: default avatarDavid Gow <davidgow@google.com>
Acked-by: default avatarDanilo 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: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 14865543
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment