From 3965a45bf0f94ef2d466acac109c86cf7112634d Mon Sep 17 00:00:00 2001 From: enforcer007 Date: Sun, 13 Nov 2022 14:25:55 +0530 Subject: [PATCH] option3 --- exercises/options/options3.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exercises/options/options3.rs b/exercises/options/options3.rs index 3f995c52..c7f124a6 100644 --- a/exercises/options/options3.rs +++ b/exercises/options/options3.rs @@ -1,8 +1,6 @@ // options3.rs // Execute `rustlings hint options3` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE - struct Point { x: i32, y: i32, @@ -11,7 +9,7 @@ struct Point { fn main() { let y: Option = Some(Point { x: 100, y: 200 }); - match y { + match &y { Some(p) => println!("Co-ordinates are {},{} ", p.x, p.y), _ => println!("no match"), }