File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ fn main() {
47
47
println!("{:?}", peter);
48
48
49
49
// Instantiate a `Point`
50
- let point: Point = Point { x: 10.3 , y: 0.4 };
51
- let another_point: Point = Point { x: 5.2 , y: 0.2 };
50
+ let point: Point = Point { x: 5.2 , y: 0.4 };
51
+ let another_point: Point = Point { x: 10.3 , y: 0.2 };
52
52
53
53
// Access the fields of the point
54
54
println!("point coordinates: ({}, {})", point.x, point.y);
55
55
56
56
// Make a new point by using struct update syntax to use the fields of our
57
57
// other one
58
- let bottom_right = Point { x: 5.2 , ..another_point };
58
+ let bottom_right = Point { x: 10.3 , ..another_point };
59
59
60
60
// `bottom_right.y` will be the same as `another_point.y` because we used that field
61
61
// from `another_point`
You can’t perform that action at this time.
0 commit comments