Skip to content

rust: sync: Arc: Implement Debug and Display

Boqun Feng lkml rust-for-linux 2 versions – Applied

Status from this message: Applied to `rust-next` (with the few changes mentioned). Thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 14 repliesApplied
  2. v1 RFC5 patches 30 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2rust: sync: impl {Debug,Display} for {Unique,}Arcrust/kernel/sync/arc.rs+25 -07 replies
2/2sample: rust: print: Add sampe code for Arc printingsamples/rust/rust_print.rs+26 -06 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchVincenzo PalazzoBjörn Roy BaronFinn BehrensGary GuoAndreas Hindborg
1/2Reviwed-by R-b R-b R-b R-b
2/2R-b R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/2] rust: sync: Arc: Implement Debug and Display

previous version:

v1: https://lore.kernel.org/rust-for-linux/[email protected]/

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

Signature · 1 line
2.39.1