Skip to content

Commit

Permalink
Merge pull request #52 from clemensw/structs_compare_to_tuples
Browse files Browse the repository at this point in the history
Example Point changes coordinates.
  • Loading branch information
steveklabnik committed Dec 29, 2015
2 parents aad634e + 799b503 commit 5cd39da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
```

Here’s what declaring a `struct` looks like:
Expand Down Expand Up @@ -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;
```

Expand Down

0 comments on commit 5cd39da

Please sign in to comment.