about summary refs log tree commit diff
path: root/src/libstd/sync/task_pool.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-18 14:35:01 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-18 14:35:01 -0800
commit5250a82f7917d6f9ec590e7e762bfd036e21ef74 (patch)
tree38ce94117b42eb159b630d0a97748b5f3056fbe5 /src/libstd/sync/task_pool.rs
parent5a32b4a34fc6fbd78e293b16f7ba7d06caca7a48 (diff)
parent811c48fe22ffbe4ca45c32807c846d9a7c02a8f3 (diff)
downloadrust-5250a82f7917d6f9ec590e7e762bfd036e21ef74.tar.gz
rust-5250a82f7917d6f9ec590e7e762bfd036e21ef74.zip
rollup merge of #22497: nikomatsakis/suffixes
Conflicts:
	src/librustc_trans/trans/tvec.rs
Diffstat (limited to 'src/libstd/sync/task_pool.rs')
-rw-r--r--src/libstd/sync/task_pool.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs
index f4274dd91cc..a45048be24c 100644
--- a/src/libstd/sync/task_pool.rs
+++ b/src/libstd/sync/task_pool.rs
@@ -63,17 +63,17 @@ impl<'a> Drop for Sentinel<'a> {
 /// use std::iter::AdditiveIterator;
 /// use std::sync::mpsc::channel;
 ///
-/// let pool = TaskPool::new(4u);
+/// let pool = TaskPool::new(4);
 ///
 /// let (tx, rx) = channel();
-/// for _ in 0..8u {
+/// for _ in 0..8 {
 ///     let tx = tx.clone();
 ///     pool.execute(move|| {
-///         tx.send(1u).unwrap();
+///         tx.send(1_u32).unwrap();
 ///     });
 /// }
 ///
-/// assert_eq!(rx.iter().take(8u).sum(), 8u);
+/// assert_eq!(rx.iter().take(8).sum(), 8);
 /// ```
 pub struct TaskPool {
     // How the threadpool communicates with subthreads.
@@ -142,7 +142,7 @@ mod test {
     use super::*;
     use sync::mpsc::channel;
 
-    const TEST_TASKS: uint = 4u;
+    const TEST_TASKS: uint = 4;
 
     #[test]
     fn test_works() {
@@ -154,7 +154,7 @@ mod test {
         for _ in 0..TEST_TASKS {
             let tx = tx.clone();
             pool.execute(move|| {
-                tx.send(1u).unwrap();
+                tx.send(1).unwrap();
             });
         }
 
@@ -183,7 +183,7 @@ mod test {
         for _ in 0..TEST_TASKS {
             let tx = tx.clone();
             pool.execute(move|| {
-                tx.send(1u).unwrap();
+                tx.send(1).unwrap();
             });
         }