|
3 | 3 | //! With the fiber module, you can: |
4 | 4 | //! - create, run and manage [fibers](Builder), |
5 | 5 | //! - use a synchronization mechanism for fibers, similar to “condition variables” and similar to operating-system |
6 | | -//! functions such as `pthread_cond_wait()` plus `pthread_cond_signal()`, |
| 6 | +//! functions such as `pthread_cond_wait()` plus `pthread_cond_signal()`, |
7 | 7 | //! - spawn a fiber based [async runtime](async). |
8 | 8 | //! |
9 | 9 | //! See also: |
@@ -110,14 +110,14 @@ pub struct Fiber<'a, T: 'a> { |
110 | 110 | } |
111 | 111 |
|
112 | 112 | #[allow(deprecated)] |
113 | | -impl<'a, T> ::std::fmt::Debug for Fiber<'a, T> { |
| 113 | +impl<T> ::std::fmt::Debug for Fiber<'_, T> { |
114 | 114 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { |
115 | 115 | f.debug_struct("Fiber").finish_non_exhaustive() |
116 | 116 | } |
117 | 117 | } |
118 | 118 |
|
119 | 119 | #[allow(deprecated)] |
120 | | -impl<'a, T> Fiber<'a, T> { |
| 120 | +impl<T> Fiber<'_, T> { |
121 | 121 | /// Create a new fiber. |
122 | 122 | /// |
123 | 123 | /// Takes a fiber from fiber cache, if it's not empty. Can fail only if there is not enough memory for |
@@ -1049,7 +1049,7 @@ pub struct JoinHandle<'f, T> { |
1049 | 1049 | marker: PhantomData<&'f ()>, |
1050 | 1050 | } |
1051 | 1051 |
|
1052 | | -impl<'f, T> std::fmt::Debug for JoinHandle<'f, T> { |
| 1052 | +impl<T> std::fmt::Debug for JoinHandle<'_, T> { |
1053 | 1053 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { |
1054 | 1054 | f.debug_struct("JoinHandle").finish_non_exhaustive() |
1055 | 1055 | } |
@@ -1082,7 +1082,7 @@ enum JoinHandleImpl<T> { |
1082 | 1082 |
|
1083 | 1083 | type FiberResultCell<T> = Box<UnsafeCell<Option<T>>>; |
1084 | 1084 |
|
1085 | | -impl<'f, T> JoinHandle<'f, T> { |
| 1085 | +impl<T> JoinHandle<'_, T> { |
1086 | 1086 | #[inline(always)] |
1087 | 1087 | fn ffi(fiber: NonNull<ffi::Fiber>, result_cell: Option<FiberResultCell<T>>) -> Self { |
1088 | 1088 | Self { |
@@ -1253,7 +1253,7 @@ impl<'f, T> JoinHandle<'f, T> { |
1253 | 1253 | } |
1254 | 1254 | } |
1255 | 1255 |
|
1256 | | -impl<'f, T> Drop for JoinHandle<'f, T> { |
| 1256 | +impl<T> Drop for JoinHandle<'_, T> { |
1257 | 1257 | fn drop(&mut self) { |
1258 | 1258 | if let Some(mut inner) = self.inner.take() { |
1259 | 1259 | if let JoinHandleImpl::Ffi { result_cell, .. } = &mut inner { |
|
0 commit comments