mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-20 14:31:15 +02:00
Add TODO to indicate let-else example should be rewritten (#2562)
Fixes #2473.
This commit is contained in:
parent
bcbe6b0876
commit
f1ad41e2bc
@ -42,6 +42,7 @@ off the end of the block).
|
||||
|
||||
```rust,editable
|
||||
fn hex_or_die_trying(maybe_string: Option<String>) -> Result<u32, String> {
|
||||
// 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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user