Slug: enum-match-02 · Paired reading: Chapters 2 and 7
Prompt
Same Status enum. Implement fn ready_msg(s: Status) -> Option<&'static str>
with if let (Some only for Ready). Also fn all_labels(s: Status) -> &'static str
via full match.
The curriculum, drills, tutor, and interviewer mode are for readers of Ace the Rust Interview. The code is printed in the Preface (Companion site access).
Don’t have the book yet? The landing page stays open — purchase unlocks this gym.
beginner · order 37
Slug: enum-match-02 · Paired reading: Chapters 2 and 7
Same Status enum. Implement fn ready_msg(s: Status) -> Option<&'static str>
with if let (Some only for Ready). Also fn all_labels(s: Status) -> &'static str
via full match.