@@ -15,7 +15,7 @@ pub struct WaitTimeoutResult(bool);
1515/// not
1616impl WaitTimeoutResult {
1717 /// Returns `true` if the wait was known to have timed out.
18- pub fn timed_out ( & self ) -> bool {
18+ pub fn timed_out ( self ) -> bool {
1919 self . 0
2020 }
2121}
@@ -62,6 +62,12 @@ pub struct Condvar {
6262 blocked : std:: sync:: Mutex < Slab < Option < Waker > > > ,
6363}
6464
65+ impl Default for Condvar {
66+ fn default ( ) -> Self {
67+ Condvar :: new ( )
68+ }
69+ }
70+
6571impl Condvar {
6672 /// Creates a new condition variable
6773 ///
@@ -111,6 +117,7 @@ impl Condvar {
111117 /// }
112118 /// # }) }
113119 /// ```
120+ #[ allow( clippy:: needless_lifetimes) ]
114121 pub async fn wait < ' a , T > ( & self , guard : MutexGuard < ' a , T > ) -> MutexGuard < ' a , T > {
115122 let mutex = guard_lock ( & guard) ;
116123
@@ -161,6 +168,7 @@ impl Condvar {
161168 /// # }) }
162169 /// ```
163170 #[ cfg( feature = "unstable" ) ]
171+ #[ allow( clippy:: needless_lifetimes) ]
164172 pub async fn wait_until < ' a , T , F > (
165173 & self ,
166174 mut guard : MutexGuard < ' a , T > ,
@@ -213,6 +221,7 @@ impl Condvar {
213221 /// #
214222 /// # }) }
215223 /// ```
224+ #[ allow( clippy:: needless_lifetimes) ]
216225 pub async fn wait_timeout < ' a , T > (
217226 & self ,
218227 guard : MutexGuard < ' a , T > ,
0 commit comments