When you define an enum, add
#[derive(PartialEq, Eq)]
enum Foo {…}
to make it work with `==`, e.g.
if foo_value == Foo::Variant {…
@rust why both PartialEq and Eq? I haven't quite grasped it yet
@rust oh right, when a trait inherits another trait, both have to be implemented (or derived). Thank you so much for tips!