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

rust: str: simplify KUnit tests `format!` macro



Simplify the `format!` macro used in the tests by using
`CString::try_from_fmt` and directly `unwrap()`ing.

This will allow us to change both `unwrap()`s here in order to showcase
the `?` operator support now that the tests are KUnit ones.

Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Acked-by: default avatarDanilo Krummrich <dakr@kernel.org>
[ Split from the next commit as suggested by Tamir. - Miguel ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 028df914
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