Created
February 25, 2020 08:09
-
-
Save ruimo/5d01edd2ba32fe8ad582ad7c2dc8e58c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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