summaryrefslogtreecommitdiff
path: root/.rustfmt.toml
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-07-23 18:59:28 +0200
committerDanilo Krummrich <dakr@kernel.org>2024-10-08 16:27:51 +0200
commitb8d7442380ac178e21a88abe361530f01ecc2f3b (patch)
tree5f329383f6fc1e101ff7e572edef0c9303d69279 /.rustfmt.toml
parent6c3c15964b19a2ee41d5075410b51f43ec8ba8c6 (diff)
rust: str: test: replace `alloc::format`
The current implementation of tests in str.rs use `format!` to format strings for comparison, which, internally, creates a new `String`. In order to prepare for getting rid of Rust's alloc crate, we have to cut this dependency. Instead, implement `format!` for `CString`. Note that for userspace tests, `Kmalloc`, which is backing `CString`'s memory, is just a type alias to `Cmalloc`. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to '.rustfmt.toml')
0 files changed, 0 insertions, 0 deletions