diff options
Diffstat (limited to 'src/doc/guide-tasks.md')
| -rw-r--r-- | src/doc/guide-tasks.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/guide-tasks.md b/src/doc/guide-tasks.md index 9021b761954..6ef273e7a1a 100644 --- a/src/doc/guide-tasks.md +++ b/src/doc/guide-tasks.md @@ -465,7 +465,7 @@ fn stringifier(channel: &DuplexStream<String, uint>) { let mut value: uint; loop { value = channel.recv(); - channel.send(value.to_str()); + channel.send(value.to_string()); if value == 0 { break; } } } @@ -478,7 +478,7 @@ send strings (the first type parameter) and receive `uint` messages (the second type parameter). The body itself simply loops, reading from the channel and then sending its response back. The actual response itself is simply the stringified version of the received value, -`uint::to_str(value)`. +`uint::to_string(value)`. Here is the code for the parent task: @@ -492,7 +492,7 @@ use std::comm::duplex; # let mut value: uint; # loop { # value = channel.recv(); -# channel.send(value.to_str()); +# channel.send(value.to_string()); # if value == 0u { break; } # } # } |
