diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-01-12 16:59:34 -0500 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-01-17 10:49:49 -0500 |
| commit | 078bd498b9fa6eab40df147ce6015ab9aae62b40 (patch) | |
| tree | 6f3ce07b5482affc2c534e937bf9bb23ccfd8f65 /src/libstd/sync | |
| parent | a03701defaf00f323aeaff033d84d93545448b77 (diff) | |
| download | rust-078bd498b9fa6eab40df147ce6015ab9aae62b40.tar.gz rust-078bd498b9fa6eab40df147ce6015ab9aae62b40.zip | |
Evaluate # fn in docs
I searched for times when we were hiding functions with # in the documentation, and fixed them to not use it unless neccesary. I also made random improvements whenever I changed something. For example, I changed Example to Examples, for consistency. Fixes #13423
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/future.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs index 568c24446e7..36bbc5ff5b4 100644 --- a/src/libstd/sync/future.rs +++ b/src/libstd/sync/future.rs @@ -11,14 +11,18 @@ //! A type representing values that may be computed concurrently and operations //! for working with them. //! -//! # Example +//! # Examples //! -//! ```rust +//! ``` //! use std::sync::Future; -//! # fn fib(n: uint) -> uint {42}; -//! # fn make_a_sandwich() {}; -//! let mut delayed_fib = Future::spawn(move|| { fib(5000) }); -//! make_a_sandwich(); +//! +//! // a fake, for now +//! fn fib(n: u32) -> u32 { 42 }; +//! +//! let mut delayed_fib = Future::spawn(move || fib(5000)); +//! +//! // do stuff... +//! //! println!("fib(5000) = {}", delayed_fib.get()) //! ``` |
