Idiomatic match with fall-through in Rust
I’m new to Rust, but as a fan of Haskell, I greatly appreciate the way match works in Rust. Now I’m faced with the rare case where I do need fall-through – in the sense that I would like all matching cases of several overlapping ones to be executed. This works: fn options(stairs: i32) -> i32 { if stairs == 0 { return 1; } let mut count: i32 = 0; if stairs >= 1 { count += options(stairs - 1); } if stairs >= 2 { count += options(stairs - 2); } if stairs >= 3 { count += options(stairs - 3); } count } My question is whether this is idiomatic in Rust or whether there is a better way. Edit: The