22//! worker thread. Intended for building abstractions atop the
33//! rayon-core thread pool, rather than direct use by end users.
44
5- use latch:: LatchProbe ;
6- use registry;
5+ use crate :: latch:: LatchProbe ;
6+ use crate :: registry;
77use std:: fmt;
88
99/// Represents the active worker thread.
@@ -29,7 +29,7 @@ impl<'w> WorkerThread<'w> {
2929 where
3030 F : Fn ( ) -> bool ,
3131 {
32- struct DummyLatch < ' a , F : ' a > {
32+ struct DummyLatch < ' a , F > {
3333 f : & ' a F ,
3434 }
3535
@@ -44,7 +44,7 @@ impl<'w> WorkerThread<'w> {
4444}
4545
4646impl < ' w > fmt:: Debug for WorkerThread < ' w > {
47- fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
47+ fn fmt ( & self , fmt : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
4848 fmt. debug_struct ( "WorkerThread" )
4949 . field ( "pool" , & self . thread . registry ( ) . id ( ) )
5050 . field ( "index" , & self . thread . index ( ) )
@@ -58,7 +58,7 @@ impl<'w> fmt::Debug for WorkerThread<'w> {
5858/// a Rayon worker thread, `None` is immediately returned.
5959pub fn if_in_worker_thread < F , R > ( if_true : F ) -> Option < R >
6060where
61- F : FnOnce ( & WorkerThread ) -> R ,
61+ F : FnOnce ( & WorkerThread < ' _ > ) -> R ,
6262{
6363 unsafe {
6464 let thread = registry:: WorkerThread :: current ( ) . as_ref ( ) ?;
0 commit comments