From: Guangbo Cui <2407018371@qq.com> Date: Mon, 11 Nov 2024 13:51:27 +0000 (+0800) Subject: rust: alloc: align Debug implementation for Box with Display X-Git-Tag: v6.14-rc1~172^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=517743c4e303252cd8c1a1fb1bed28e7d94d4678;p=thirdparty%2Flinux.git 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 Signed-off-by: Guangbo Cui <2407018371@qq.com> Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/tencent_1FC0BC283DA65DD81A8A14EEF25563934E05@qq.com [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda --- diff --git a/rust/kernel/alloc/kbox.rs b/rust/kernel/alloc/kbox.rs index 6beb976580262..19e227351918a 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) + ::fmt(&**self, f) } }