We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b26672d + ba7ee6a commit 311b849Copy full SHA for 311b849
src/error/option_unwrap/question_mark.md
@@ -8,7 +8,8 @@ function is being executed and return `None`.
8
```rust,editable
9
fn next_birthday(current_age: Option<u8>) -> Option<String> {
10
// If `current_age` is `None`, this returns `None`.
11
- // If `current_age` is `Some`, the inner `u8` gets assigned to `next_age`
+ // If `current_age` is `Some`, the inner `u8` value + 1
12
+ // gets assigned to `next_age`
13
let next_age: u8 = current_age? + 1;
14
Some(format!("Next year I will be {}", next_age))
15
}
0 commit comments