Skip to content

Instantly share code, notes, and snippets.

@ruimo
Created February 25, 2020 08:09
Show Gist options
  • Save ruimo/5d01edd2ba32fe8ad582ad7c2dc8e58c to your computer and use it in GitHub Desktop.
Save ruimo/5d01edd2ba32fe8ad582ad7c2dc8e58c to your computer and use it in GitHub Desktop.
#[derive(Copy, Clone)]
struct Point {
x: i32,
y: i32,
}
fn main() {
let p0 = Point {x: 1, y: 2};
let p1 = p0;
println!("point: {}, {}", p0.x, p0.y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment