rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Vincenzo Palazzo" <vincenzopalazzodev@gmail.com>,
	"Will Deacon" <will@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Sergio González Collado" <sergio.collado@gmail.com>,
	"Finn Behrens" <fin@nyantec.com>
Subject: [PATCH v2 0/2] rust: sync: Arc: Implement Debug and Display
Date: Tue,  7 Feb 2023 10:52:14 -0800	[thread overview]
Message-ID: <20230207185216.1314638-1-boqun.feng@gmail.com> (raw)

previous version:

v1:	https://lore.kernel.org/rust-for-linux/20230201232244.212908-1-boqun.feng@gmail.com/	

Changes since v1:

*	Remove the refcount for Debug impl as per Peter and Greg.
*	Since the refcount_read() bits are removed, therefore squash all
	4 patches into one (I keep the Reviewed-by tags for anyone that
	gave to both patch #1 and patch #4 in v1). Thanks for everyone
	for the reviewing ;-)


I found that our Arc doesn't implement `Debug` or `Display` when I tried
to play with them, therefore add these implementation.

With these changes, I could get the following print with the sample code
in patch #2:

	[..] rust_print: 1
	[..] rust_print: "hello, world"
	[..] rust_print: [samples/rust/rust_print.rs:34] c = "hello, world"
	[..] rust_print: "hello, world"

Suggestions and comments are welcome!

Regards,
Boqun

-- 
2.39.1


             reply	other threads:[~2023-02-07 18:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 18:52 Boqun Feng [this message]
2023-02-07 18:52 ` [PATCH v2 1/2] rust: sync: impl {Debug,Display} for {Unique,}Arc Boqun Feng
2023-02-07 19:03   ` Carlos Bilbao
2023-02-07 20:27     ` Vincenzo Palazzo
2023-02-07 20:45   ` Vincenzo Palazzo
2023-02-07 20:54     ` Boqun Feng
2023-02-08  4:57   ` Gary Guo
2023-02-08 10:00   ` Andreas Hindborg
2023-02-08 13:43   ` Björn Roy Baron
2023-02-07 18:52 ` [PATCH v2 2/2] sample: rust: print: Add sampe code for Arc printing Boqun Feng
2023-02-08  4:57   ` Gary Guo
2023-02-08 10:01   ` Andreas Hindborg
2023-02-08 15:19   ` Miguel Ojeda
2023-02-08 16:33     ` Boqun Feng
2023-02-08 16:56       ` Miguel Ojeda
2023-02-08 16:58         ` Boqun Feng
2023-04-10  2:53 ` [PATCH v2 0/2] rust: sync: Arc: Implement Debug and Display 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=20230207185216.1314638-1-boqun.feng@gmail.com \
    --to=boqun.feng@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=fin@nyantec.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sergio.collado@gmail.com \
    --cc=vincenzopalazzodev@gmail.com \
    --cc=wedsonaf@gmail.com \
    --cc=will@kernel.org \
    /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).