diff options
author | Wedson Almeida Filho <wedsonaf@gmail.com> | 2022-11-10 17:41:32 +0100 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2022-12-04 01:59:15 +0100 |
commit | fffed679eeea119c8f972954518c142ec95bda4a (patch) | |
tree | 5cbff8a0ad404cf53264298a928ae419b9076ea5 /rust/kernel/lib.rs | |
parent | b18cb00e5a8a1182ef491b770ea1a3dab081dc5b (diff) | |
download | linux-fffed679eeea119c8f972954518c142ec95bda4a.tar.bz2 |
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>
Diffstat (limited to 'rust/kernel/lib.rs')
0 files changed, 0 insertions, 0 deletions