nick34992
4/14/2017 - 7:40 PM

Rust: Reference, Dereference

Rust: Reference, Dereference

fn main() {
    let q = &42;
        println!("{}", square(q)); // 1764
        fn square(k: &i32) -> i32 {
        *k * *k
    }
}