Pattern matching works now
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
let my_tuple = option::some t[1, 2]
|
||||
let main = tuple::get (option::expect my_tuple "tuple is none") 1
|
||||
|
||||
let main = match my_tuple {
|
||||
option::of t[ref head, ..] => head;
|
||||
option::empty => "foo";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user