Merge pull request #52 from clemensw/structs_compare_to_tuples

Example Point changes coordinates.
This commit is contained in:
Steve Klabnik 2015-12-29 10:58:54 -05:00
commit 5cd39dadb6

View File

@ -143,7 +143,7 @@ struct Point {
y: f64,
}
let p1 = Point { x: 0.0, y: 0.0 };
let p1 = Point { x: 0.0, y: 5.0 };
```
Heres what declaring a `struct` looks like:
@ -176,7 +176,7 @@ struct Point {
y: f64,
}
let p1 = Point { x: 0.0, y: 0.0 };
let p1 = Point { x: 0.0, y: 5.0 };
let x = p1.x;
```