Skip to content

Commit ea3d0a2

Browse files
Merge pull request #2709 from jayeshmann/patch-1
2 parents b06edab + c2bc97e commit ea3d0a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ch20-02-multithreaded.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ shows us the following:
226226
```rust,ignore
227227
pub fn spawn<F, T>(f: F) -> JoinHandle<T>
228228
where
229-
F: FnOnce() -> T + Send + 'static,
230-
T: Send + 'static
229+
F: FnOnce() -> T,
230+
F: Send + 'static,
231+
T: Send + 'static,
231232
```
232233

233234
The `F` type parameter is the one we’re concerned with here; the `T` type
@@ -321,8 +322,9 @@ the `thread::spawn` signature:
321322
```rust,ignore
322323
pub fn spawn<F, T>(f: F) -> JoinHandle<T>
323324
where
324-
F: FnOnce() -> T + Send + 'static,
325-
T: Send + 'static
325+
F: FnOnce() -> T,
326+
F: Send + 'static,
327+
T: Send + 'static,
326328
```
327329

328330
The `spawn` function returns a `JoinHandle<T>`, where `T` is the type that the

0 commit comments

Comments
 (0)