Some if-let in RBE
This commit is contained in:
11
rustbyexample/flow_control.d/if_let3.rs
Normal file
11
rustbyexample/flow_control.d/if_let3.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
enum Foo {
|
||||
Bar,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let a = Foo::Bar;
|
||||
|
||||
if let Foo::Bar = a {
|
||||
println!("a is foobar");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user