13 lines
377 B
Markdown
13 lines
377 B
Markdown
# Hints
|
|
|
|
## 1. Define the TreasureChest generic custom type
|
|
|
|
- The `TreasureChest` custom type only has a single variant.
|
|
|
|
## 2. Define the UnlockResult generic custom type
|
|
|
|
- The `UnlockResult` custom type has 2 variants, `Unlocked`, and `WrongPassword`.
|
|
|
|
## 3. Define the get_treasure function
|
|
|
|
- Custom types can be pattern matched on in the same way to access their values. |