mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 20:24:32 -06:00
@@ -179,7 +179,7 @@ Because [`push_str()`] has the following signature:
|
|||||||
fn push_str(&mut self, string: &str) {
|
fn push_str(&mut self, string: &str) {
|
||||||
```
|
```
|
||||||
|
|
||||||
[`push_str()`]: http://doc.rust-lang.org/collections/string/struct.String.html#method.push_str
|
[`push_str()`]: ../collections/string/struct.String.html#method.push_str
|
||||||
|
|
||||||
This automatic referencing behavior works because methods have a clear receiver
|
This automatic referencing behavior works because methods have a clear receiver
|
||||||
— the type of `self` — and in most cases it’s clear given the receiver and name
|
— the type of `self` — and in most cases it’s clear given the receiver and name
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ enum IpAddr {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
[IpAddr]: http://doc.rust-lang.org/std/net/enum.IpAddr.html
|
[IpAddr]: ../std/net/enum.IpAddr.html
|
||||||
|
|
||||||
Here’s an enum with a variety of types embedded in its variants:
|
Here’s an enum with a variety of types embedded in its variants:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user