Drop the dummy no-std `Condvar` which never sleeps
[rust-lightning] / lightning / src / sync / debug_sync.rs
index edf7c753537e105d842f3143eadb55840cb8da2a..b9f015af65697bedea34edaabcede1c9e559bdfd 100644 (file)
@@ -37,11 +37,6 @@ impl Condvar {
                Condvar { inner: StdCondvar::new() }
        }
 
-       pub fn wait<'a, T>(&'a self, guard: MutexGuard<'a, T>) -> LockResult<MutexGuard<'a, T>> {
-               let mutex: &'a Mutex<T> = guard.mutex;
-               self.inner.wait(guard.into_inner()).map(|lock| MutexGuard { mutex, lock }).map_err(|_| ())
-       }
-
        pub fn wait_while<'a, T, F: FnMut(&mut T) -> bool>(&'a self, guard: MutexGuard<'a, T>, condition: F)
        -> LockResult<MutexGuard<'a, T>> {
                let mutex: &'a Mutex<T> = guard.mutex;
@@ -49,12 +44,6 @@ impl Condvar {
                        .map_err(|_| ())
        }
 
-       #[allow(unused)]
-       pub fn wait_timeout<'a, T>(&'a self, guard: MutexGuard<'a, T>, dur: Duration) -> LockResult<(MutexGuard<'a, T>, ())> {
-               let mutex = guard.mutex;
-               self.inner.wait_timeout(guard.into_inner(), dur).map(|(lock, _)| (MutexGuard { mutex, lock }, ())).map_err(|_| ())
-       }
-
        #[allow(unused)]
        pub fn wait_timeout_while<'a, T, F: FnMut(&mut T) -> bool>(&'a self, guard: MutexGuard<'a, T>, dur: Duration, condition: F)
        -> LockResult<(MutexGuard<'a, T>, WaitTimeoutResult)> {