Skip to content

Commit a87a51a

Browse files
authored
Merge pull request #1503 from FlorentCLMichel/master
Add +1 to next_age
2 parents cb578b1 + 3211811 commit a87a51a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error/option_unwrap/question_mark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function is being executed and return `None`.
99
fn next_birthday(current_age: Option<u8>) -> Option<String> {
1010
// If `current_age` is `None`, this returns `None`.
1111
// If `current_age` is `Some`, the inner `u8` gets assigned to `next_age`
12-
let next_age: u8 = current_age?;
12+
let next_age: u8 = current_age? + 1;
1313
Some(format!("Next year I will be {}", next_age))
1414
}
1515
```

0 commit comments

Comments
 (0)