diff options
author | Guangbo Cui <2407018371@qq.com> | 2024-11-11 16:51:27 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-12-18 02:56:05 +0300 |
commit | 517743c4e303252cd8c1a1fb1bed28e7d94d4678 (patch) | |
tree | 999fb1ee17a55b2d4f0a863bc6a85f0124d74c97 /rust | |
parent | 21e08aa59a9a0b665b051a8919ec80a872807cfb (diff) | |
download | linux-517743c4e303252cd8c1a1fb1bed28e7d94d4678.tar.xz |
rust: alloc: align Debug implementation for Box with Display
Ensure consistency between `Debug` and `Display` for `Box` by
updating `Debug` to match the new `Display` style.
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Guangbo Cui <2407018371@qq.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/tencent_1FC0BC283DA65DD81A8A14EEF25563934E05@qq.com
[ Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust')
-rw-r--r-- | rust/kernel/alloc/kbox.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/alloc/kbox.rs b/rust/kernel/alloc/kbox.rs index 6beb97658026..19e227351918 100644 --- a/rust/kernel/alloc/kbox.rs +++ b/rust/kernel/alloc/kbox.rs @@ -443,7 +443,7 @@ where A: Allocator, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - fmt::Debug::fmt(&**self, f) + <T as fmt::Debug>::fmt(&**self, f) } } |