Skip to content

Commit af7a5f1

Browse files
author
Olivier Saut
committed
---
yaml --- r: 60442 b: refs/heads/auto c: 7dc466f h: refs/heads/master v: v3
1 parent c6b8f75 commit af7a5f1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: ff081980e7b5005d3e06ea539819ad98656d4a9b
17+
refs/heads/auto: 7dc466f91f3f6bf44d72430bf760277cd4eebf3a
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/future.rs

Lines changed: 8 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,11 @@
1515
* # Example
1616
*
1717
* ~~~
18-
* let delayed_fib = future::spawn {|| fib(5000) };
18+
* # fn fib(n: uint) -> uint {42};
19+
* # fn make_a_sandwich() {};
20+
* let mut delayed_fib = std::future::spawn (|| fib(5000) );
1921
* make_a_sandwich();
20-
* io::println(fmt!("fib(5000) = %?", delayed_fib.get()))
22+
* println(fmt!("fib(5000) = %?", delayed_fib.get()))
2123
* ~~~
2224
*/
2325

@@ -51,7 +53,7 @@ priv enum FutureState<A> {
5153
/// Methods on the `future` type
5254
pub impl<A:Copy> Future<A> {
5355
fn get(&mut self) -> A {
54-
//! Get the value of the future
56+
//! Get the value of the future.
5557
*(self.get_ref())
5658
}
5759
}
@@ -87,7 +89,7 @@ pub impl<A> Future<A> {
8789

8890
pub fn from_value<A>(val: A) -> Future<A> {
8991
/*!
90-
* Create a future from a value
92+
* Create a future from a value.
9193
*
9294
* The value is immediately available and calling `get` later will
9395
* not block.
@@ -117,7 +119,7 @@ pub fn from_fn<A>(f: ~fn() -> A) -> Future<A> {
117119
/*!
118120
* Create a future from a function.
119121
*
120-
* The first time that the value is requested it will be retreived by
122+
* The first time that the value is requested it will be retrieved by
121123
* calling the function. Note that this function is a local
122124
* function. It is not spawned into another task.
123125
*/

0 commit comments

Comments
 (0)