Skip to content

Commit ed3d672

Browse files
committed
Fix typo
1 parent fa312a3 commit ed3d672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/ch05-03-method-syntax.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The `&self` is actually short for `self: &Self`. Within an `impl` block, the
3838
type `Self` is an alias for the type that the `impl` block is for. Methods must
3939
have a parameter named `self` of type `Self` for their first parameter, so Rust
4040
lets you abbreviate this with only the name `self` in the first parameter spot.
41-
Note that we still need to use the `&` in front of the `self` shorthand to
41+
Note that we still need to use the `&` behind the `self` shorthand to
4242
indicate that this method borrows the `Self` instance, just as we did in
4343
`rectangle: &Rectangle`. Methods can take ownership of `self`, borrow `self`
4444
immutably, as we’ve done here, or borrow `self` mutably, just as they can any

0 commit comments

Comments
 (0)