Fixes from review

Traits -> Field labels
Revert a change to convention
This commit is contained in:
Xmasreturns 2015-12-09 13:25:53 -08:00
parent 6bbe6759a5
commit 2adba31682

View File

@ -10,7 +10,7 @@ let origin_y = 0;
``` ```
A `struct` lets us combine these two into a single, unified datatype with `x` A `struct` lets us combine these two into a single, unified datatype with `x`
and `y` as traits: and `y` as field labels:
```rust ```rust
struct Point { struct Point {
@ -19,7 +19,7 @@ struct Point {
} }
fn main() { fn main() {
let origin = Point { x: 0, y: 0 }; // create an instance let origin = Point { x: 0, y: 0 }; // origin: Point
println!("The origin is at ({}, {})", origin.x, origin.y); println!("The origin is at ({}, {})", origin.x, origin.y);
} }