Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH 0/2] Replace unwraps in doctests with graceful handling
@ 2024-11-16 19:46 Daniel Sedlak
  2024-11-16 19:46 ` [PATCH 1/2] rust: kernel: init: replace unwraps with the question mark operators Daniel Sedlak
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Daniel Sedlak @ 2024-11-16 19:46 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
	Daniel Sedlak

There are multiple occurrences where we use unwraps (or other panickable behavior)
within documentation tests. In the following patches, I try to replace at least some
of the occurrences with graceful handling. I haven't touched the rest (yet),
since I am unsure whether we will all agree on this. If we agree on the handling
I can submit them in v2 or as a follow patches.

Daniel Sedlak (2):
  rust: kernel: init: replace unwraps with the question mark operators
  rust: kernel: rbtree: replace unwraps with functional programming
    paradigms

 rust/kernel/init.rs   |  6 ++--
 rust/kernel/rbtree.rs | 78 ++++++++++++++++++++++---------------------
 2 files changed, 44 insertions(+), 40 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-11-18 20:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16 19:46 [PATCH 0/2] Replace unwraps in doctests with graceful handling Daniel Sedlak
2024-11-16 19:46 ` [PATCH 1/2] rust: kernel: init: replace unwraps with the question mark operators Daniel Sedlak
2024-11-17  7:34   ` Dirk Behme
2024-11-17 17:38     ` Daniel Sedlak
2024-11-16 19:46 ` [PATCH 2/2] rust: kernel: rbtree: replace unwraps with functional programming paradigms Daniel Sedlak
2024-11-16 21:28   ` Miguel Ojeda
2024-11-17 18:36     ` Daniel Sedlak
2024-11-17 20:33       ` Miguel Ojeda
2024-11-18 20:04         ` Daniel Sedlak
2024-11-16 20:01 ` [PATCH 0/2] Replace unwraps in doctests with graceful handling Miguel Ojeda
2024-11-17 17:17   ` Daniel Sedlak
2024-11-17 20:06     ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox