WSL2-Linux-Kernel/rust/kernel
Wedson Almeida Filho fffed679ee rust: str: add `Formatter` type
Add the `Formatter` type, which leverages `RawFormatter`,
but fails if callers attempt to write more than will fit
in the buffer.

In order to so, implement the `RawFormatter::from_buffer()`
constructor as well.

Co-developed-by: Adam Bratschi-Kaye <ark.email@gmail.com>
Signed-off-by: Adam Bratschi-Kaye <ark.email@gmail.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-12-04 01:59:15 +01:00
..
allocator.rs
error.rs rust: error: add `From` implementations for `Error` 2022-12-04 01:59:15 +01:00
lib.rs rust: error: add `From` implementations for `Error` 2022-12-04 01:59:15 +01:00
prelude.rs rust: str: add `CStr` type 2022-12-04 01:59:15 +01:00
print.rs rust: print: add `pr_cont!` macro 2022-12-01 20:12:44 +01:00
str.rs rust: str: add `Formatter` type 2022-12-04 01:59:15 +01:00