diff options
| author | Richo Healey <richo@psych0tik.net> | 2014-05-25 03:17:19 -0700 |
|---|---|---|
| committer | Richo Healey <richo@psych0tik.net> | 2014-05-27 12:59:31 -0700 |
| commit | 1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f (patch) | |
| tree | 2a56d5ceda84c1a58796fe0fc4e7cea38a9336f6 /src/doc/rust.md | |
| parent | 4348e23b269739657d934b532ad061bfd6d92309 (diff) | |
| download | rust-1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f.tar.gz rust-1f1b2e42d76ba1cd884adc49922636a6c2ac1b2f.zip | |
std: Rename strbuf operations to string
[breaking-change]
Diffstat (limited to 'src/doc/rust.md')
| -rw-r--r-- | src/doc/rust.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md index 2f002dcfb9a..4ea17e735df 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -1264,8 +1264,8 @@ enum Animal { Cat { name: String, weight: f64 } } -let mut a: Animal = Dog("Cocoa".to_strbuf(), 37.2); -a = Cat { name: "Spotty".to_strbuf(), weight: 2.7 }; +let mut a: Animal = Dog("Cocoa".to_string(), 37.2); +a = Cat { name: "Spotty".to_string(), weight: 2.7 }; ~~~~ In this example, `Cat` is a _struct-like enum variant_, @@ -3578,7 +3578,7 @@ trait Printable { } impl Printable for int { - fn to_string(&self) -> String { self.to_str().to_strbuf() } + fn to_string(&self) -> String { self.to_str().to_string() } } fn print(a: Box<Printable>) { |
