Skip to content

Commit 517743c

Browse files
JCKeepojeda
authored andcommitted
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>
1 parent 21e08aa commit 517743c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/alloc/kbox.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ where
443443
A: Allocator,
444444
{
445445
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
446-
fmt::Debug::fmt(&**self, f)
446+
<T as fmt::Debug>::fmt(&**self, f)
447447
}
448448
}
449449

0 commit comments

Comments
 (0)