Skip to content

Commit 2a057f8

Browse files
committed
Updated readme from when apply was renamed foreach.
This change occurred in c5e5e4c but the readme wasn't updated.
1 parent 202898d commit 2a057f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ queue.async(|| println!("World"));
2727
Concurrent dispatch queues execute tasks concurrently. GCD provides global
2828
concurrent queues that can be accessed through the `Queue::global` function.
2929

30-
`Queue` has two methods that can simplify processing data in parallel, `apply`
30+
`Queue` has two methods that can simplify processing data in parallel, `foreach`
3131
and `map`:
3232

3333
``` rust
@@ -36,7 +36,7 @@ use dispatch::{Queue, QueuePriority};
3636
let queue = Queue::global(QueuePriority::Default);
3737

3838
let mut nums = vec![1, 2];
39-
queue.apply(&mut nums, |x| *x += 1);
39+
queue.foreach(&mut nums, |x| *x += 1);
4040
assert!(nums == [2, 3]);
4141

4242
let nums = queue.map(nums, |x| x.to_string());

0 commit comments

Comments
 (0)