Skip to content

Commit

Permalink
Fixes from review
Browse files Browse the repository at this point in the history
Traits -> Field labels
Revert a change to convention
  • Loading branch information
Xmasreturns committed Dec 9, 2015
1 parent 6bbe675 commit 2adba31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let origin_y = 0;
```

A `struct` lets us combine these two into a single, unified datatype with `x`
and `y` as traits:
and `y` as field labels:

```rust
struct Point {
Expand All @@ -19,7 +19,7 @@ struct Point {
}

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);
}
Expand Down

0 comments on commit 2adba31

Please sign in to comment.