Skip to content

Commit 589d2c7

Browse files
author
Olivier Saut
committed
Correct the example given for a future, add punctuation where necessary
1 parent 92b7a45 commit 589d2c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libstd/future.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -15,9 +15,9 @@
1515
* # Example
1616
*
1717
* ~~~
18-
* let delayed_fib = future::spawn {|| fib(5000) };
18+
* let mut delayed_fib = future::spawn (|| fib(5000) );
1919
* make_a_sandwich();
20-
* io::println(fmt!("fib(5000) = %?", delayed_fib.get()))
20+
* println(fmt!("fib(5000) = %?", delayed_fib.get()))
2121
* ~~~
2222
*/
2323

@@ -51,7 +51,7 @@ priv enum FutureState<A> {
5151
/// Methods on the `future` type
5252
pub impl<A:Copy> Future<A> {
5353
fn get(&mut self) -> A {
54-
//! Get the value of the future
54+
//! Get the value of the future.
5555
*(self.get_ref())
5656
}
5757
}
@@ -87,7 +87,7 @@ pub impl<A> Future<A> {
8787

8888
pub fn from_value<A>(val: A) -> Future<A> {
8989
/*!
90-
* Create a future from a value
90+
* Create a future from a value.
9191
*
9292
* The value is immediately available and calling `get` later will
9393
* not block.
@@ -117,7 +117,7 @@ pub fn from_fn<A>(f: ~fn() -> A) -> Future<A> {
117117
/*!
118118
* Create a future from a function.
119119
*
120-
* The first time that the value is requested it will be retreived by
120+
* The first time that the value is requested it will be retrieved by
121121
* calling the function. Note that this function is a local
122122
* function. It is not spawned into another task.
123123
*/

0 commit comments

Comments
 (0)