diff options
author | Tamir Duberstein <tamird@gmail.com> | 2025-07-04 16:14:54 -0400 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2025-07-21 01:16:35 +0200 |
commit | 386f285d885ae40b64ccf8328d59694055af3187 (patch) | |
tree | 2fea8e1dbe2a3c23e7db38c67d61d98c4d2f952b /samples/rust/rust_print_main.rs | |
parent | bda947d613f1882c73ebb3ddda388459bab5902c (diff) |
rust: use `kernel::{fmt,prelude::fmt!}`
Reduce coupling to implementation details of the formatting machinery by
avoiding direct use for `core`'s formatting traits and macros.
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250704-core-cstr-prepare-v1-3-a91524037783@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'samples/rust/rust_print_main.rs')
-rw-r--r-- | samples/rust/rust_print_main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/rust/rust_print_main.rs b/samples/rust/rust_print_main.rs index 8ea95e8c2f36..4095c72afeab 100644 --- a/samples/rust/rust_print_main.rs +++ b/samples/rust/rust_print_main.rs @@ -40,7 +40,7 @@ fn arc_print() -> Result { // behaviour, contract or protocol on both `i32` and `&str` into a single `Arc` of // type `Arc<dyn Display>`. - use core::fmt::Display; + use kernel::fmt::Display; fn arc_dyn_print(arc: &Arc<dyn Display>) { pr_info!("Arc<dyn Display> says {arc}"); } |