12 lines
125 B
Rust
12 lines
125 B
Rust
enum Foo {
|
|
Bar,
|
|
}
|
|
|
|
fn main() {
|
|
let a = Foo::Bar;
|
|
|
|
if let Foo::Bar = a {
|
|
println!("a is foobar");
|
|
}
|
|
}
|