Skip to content

Commit 88a102e

Browse files
authored
get_or_insert example: print my_fruit as intended
1 parent 8888f94 commit 88a102e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error/option_unwrap/defaults.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn main() {
7070
let mut my_fruit: Option<Fruit> = None;
7171
let apple = Fruit::Apple;
7272
let first_available_fruit = my_fruit.get_or_insert(apple);
73-
println!("my_fruit is: {:?}", first_available_fruit);
73+
println!("my_fruit is: {:?}", my_fruit);
7474
println!("first_available_fruit is: {:?}", first_available_fruit);
7575
// my_fruit is: Apple
7676
// first_available_fruit is: Apple

0 commit comments

Comments
 (0)