samples: rust: print: Add sample code for Arc printing
authorBoqun Feng <boqun.feng@gmail.com>
Tue, 7 Feb 2023 18:52:16 +0000 (10:52 -0800)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 10 Apr 2023 03:05:43 +0000 (05:05 +0200)
commitf431c5c581fa176f608ba3fdebb3c1051bad5774
tree05bf3b7e7e5c343c883c4f5077cddcf3bd3a9568
parent00140a8308367208d56e93cf08fa1636202a0dc7
samples: rust: print: Add sample code for Arc printing

This both demonstrates the usage of different print format in Rust and
serves as a selftest for the `Display` and `Debug` implementation of
`Arc` and its friends.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Finn Behrens <fin@nyantec.com>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Link: https://lore.kernel.org/r/20230207185216.1314638-3-boqun.feng@gmail.com
[ Applied suggestions and reworded for fixing title typos. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
samples/rust/rust_print.rs