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 cb578b1 + 3211811 commit a87a51aCopy full SHA for a87a51a
src/error/option_unwrap/question_mark.md
@@ -9,7 +9,7 @@ function is being executed and return `None`.
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`
12
- let next_age: u8 = current_age?;
+ let next_age: u8 = current_age? + 1;
13
Some(format!("Next year I will be {}", next_age))
14
}
15
```
0 commit comments