rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guangbo Cui <2407018371@qq.com>
To: Miguel Ojeda <ojeda@kernel.org>, Alex Gaynor <alex.gaynor@gmail.com>
Cc: "Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	rust-for-linux@vger.kernel.org,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Guangbo Cui" <2407018371@qq.com>
Subject: [PATCH v5 2/2] rust: align Debug implementation for Box with Display
Date: Mon, 11 Nov 2024 21:51:27 +0800	[thread overview]
Message-ID: <tencent_1FC0BC283DA65DD81A8A14EEF25563934E05@qq.com> (raw)
In-Reply-To: <tencent_2AD25C6A6898D3A598CBA54BB6AF59BB900A@qq.com>

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>
---
 rust/kernel/alloc/kbox.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/alloc/kbox.rs b/rust/kernel/alloc/kbox.rs
index a496a866d..49c24727f 100644
--- a/rust/kernel/alloc/kbox.rs
+++ b/rust/kernel/alloc/kbox.rs
@@ -443,7 +443,7 @@ impl<T, A> fmt::Debug for Box<T, A>
     A: Allocator,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        fmt::Debug::fmt(&**self, f)
+        <T as fmt::Debug>::fmt(&**self, f)
     }
 }
 
-- 
2.34.1


  parent reply	other threads:[~2024-11-11 13:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11 13:40 [PATCH v5 1/2] rust: Implement Display for Box Guangbo Cui
2024-11-11 13:45 ` Alice Ryhl
2024-11-11 13:51 ` Guangbo Cui [this message]
2024-11-11 13:54   ` [PATCH v5 2/2] rust: align Debug implementation for Box with Display Alice Ryhl
2024-12-18  0:02 ` [PATCH v5 1/2] rust: Implement Display for Box Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_1FC0BC283DA65DD81A8A14EEF25563934E05@qq.com \
    --to=2407018371@qq.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).