Skip to content

Commit 11449c7

Browse files
committed
Duration is unused; remove it
1 parent add17d9 commit 11449c7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/doc/trpl/concurrency.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ finished. If we didn't want this behaviour, we could use `thread::spawn()`:
9090
```
9191
# #![feature(std_misc)]
9292
use std::thread;
93-
use std::time::Duration;
9493
9594
fn main() {
9695
thread::spawn(|| {
@@ -148,7 +147,6 @@ languages. It will not compile:
148147
```ignore
149148
# #![feature(std_misc)]
150149
use std::thread;
151-
use std::time::Duration;
152150
153151
fn main() {
154152
let mut data = vec![1u32, 2, 3];
@@ -187,7 +185,6 @@ but for a different reason:
187185
```ignore
188186
# #![feature(std_misc)]
189187
use std::thread;
190-
use std::time::Duration;
191188
use std::sync::Mutex;
192189
193190
fn main() {
@@ -232,7 +229,6 @@ We can use `Arc<T>` to fix this. Here's the working version:
232229
# #![feature(std_misc)]
233230
use std::sync::{Arc, Mutex};
234231
use std::thread;
235-
use std::time::Duration;
236232
237233
fn main() {
238234
let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
@@ -257,7 +253,6 @@ thread more closely:
257253
# #![feature(std_misc)]
258254
# use std::sync::{Arc, Mutex};
259255
# use std::thread;
260-
# use std::time::Duration;
261256
# fn main() {
262257
# let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
263258
# for i in 0..2 {

0 commit comments

Comments
 (0)