From f1ad41e2bcdd18c6a4989765dfd93cb6940326f8 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sun, 19 Jan 2025 01:47:33 -0500 Subject: [PATCH] Add TODO to indicate let-else example should be rewritten (#2562) Fixes #2473. --- src/pattern-matching/let-control-flow.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pattern-matching/let-control-flow.md b/src/pattern-matching/let-control-flow.md index af2b1197..046a3ca3 100644 --- a/src/pattern-matching/let-control-flow.md +++ b/src/pattern-matching/let-control-flow.md @@ -42,6 +42,7 @@ off the end of the block). ```rust,editable fn hex_or_die_trying(maybe_string: Option) -> Result { + // TODO: The structure of this code is difficult to follow -- rewrite it with let-else! if let Some(s) = maybe_string { if let Some(first_byte_char) = s.chars().next() { if let Some(digit) = first_byte_char.to_digit(16) {