Skip to content

Commit 249cad9

Browse files
committed
Add bounds for WorkerLocal's Send and Sync
1 parent ae7bbbd commit 249cad9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rayon-core/src/worker_local.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pub struct WorkerLocal<T> {
1515
registry: Arc<Registry>,
1616
}
1717

18-
unsafe impl<T> Send for WorkerLocal<T> {}
19-
unsafe impl<T> Sync for WorkerLocal<T> {}
18+
unsafe impl<T: Send> Send for WorkerLocal<T> {}
19+
unsafe impl<T: Send> Sync for WorkerLocal<T> {}
2020

2121
impl<T> WorkerLocal<T> {
2222
/// Creates a new worker local where the `initial` closure computes the

0 commit comments

Comments
 (0)