Rob Sutherland’s Musings on Life, Code, and Anything Else

Code Sample Page

Here's a very simple piece of sample code.

fn main() {
    let width = 4;
    let height = 7;
    let depth = 10;
    // 1. Try running this code with `cargo run` and take a look at the error.
    //
    // See if you can fix the error. It is right around here, somewhere.  If you succeed, then
    // doing `cargo run` should succeed and print something out.
    {
        let area = area_of(width, height);
    }
    println!("Area is {}", area);
}

And here's a paragraph following the sample code.