cfor 1.1.0

A macro that gives Rust a C-style for loop, with initialisation, condition and step. This correctly handles control-flow like continue and break.
Documentation
1
2
3
4
5
6
7
#[macro_use] extern crate cfor;
fn main() {
cfor!{let mut x = 0, let mut y = 1; x < 4; x += 1, y *= 2; {
     println!("{} {}", x, y);
}}

    }