Skip to content

Commit 311b849

Browse files
authored
Merge pull request #1761 from kberov/unwrap_question_mark
Fixed explanation mistake in comment
2 parents b26672d + ba7ee6a commit 311b849

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/error/option_unwrap/question_mark.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ function is being executed and return `None`.
88
```rust,editable
99
fn next_birthday(current_age: Option<u8>) -> Option<String> {
1010
// If `current_age` is `None`, this returns `None`.
11-
// If `current_age` is `Some`, the inner `u8` gets assigned to `next_age`
11+
// If `current_age` is `Some`, the inner `u8` value + 1
12+
// gets assigned to `next_age`
1213
let next_age: u8 = current_age? + 1;
1314
Some(format!("Next year I will be {}", next_age))
1415
}

0 commit comments

Comments
 (0)