Testing Out Enums
Published 322d ago
cooluser
Enum editing
enum MyEnum {
TestEnum,
TestEnumAgain,
}
fn main() {
let x = MyEnum::TestEnum;
match x {
MyEnum::TestEnum => println!("matches test enum once"),
MyEnum::TestEnumAgain => println!("matches again"),
};
}
enumstesting
Please login or sign up to comment and collaborate