Skip to content

Commit a138631

Browse files
authored
Merge branch 'rust-lang:master' into zh
2 parents 7fa8a2c + c79ec34 commit a138631

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/conversion/from_into.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn main() {
6969
}
7070
```
7171

72-
## `From` and `Into` are interchangable
72+
## `From` and `Into` are interchangeable
7373

7474
`From` and `Into` are designed to be complementary.
7575
We do not need to provide an implementation for both traits.

src/custom_types/structs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ fn main() {
4747
println!("{:?}", peter);
4848
4949
// 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 };
5252
5353
// Access the fields of the point
5454
println!("point coordinates: ({}, {})", point.x, point.y);
5555
5656
// Make a new point by using struct update syntax to use the fields of our
5757
// other one
58-
let bottom_right = Point { x: 5.2, ..another_point };
58+
let bottom_right = Point { x: 10.3, ..another_point };
5959
6060
// `bottom_right.y` will be the same as `another_point.y` because we used that field
6161
// from `another_point`

0 commit comments

Comments
 (0)