File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ use std::sync::RwLockReadGuard as StdRwLockReadGuard;
1212use std:: sync:: RwLockWriteGuard as StdRwLockWriteGuard ;
1313use std:: sync:: Condvar as StdCondvar ;
1414
15+ pub use std:: sync:: WaitTimeoutResult ;
16+
1517use crate :: prelude:: HashMap ;
1618
1719use super :: { LockTestExt , LockHeldState } ;
@@ -26,11 +28,6 @@ impl Backtrace { fn new() -> Backtrace { Backtrace {} } }
2628
2729pub type LockResult < Guard > = Result < Guard , ( ) > ;
2830
29- pub struct WaitTimeoutResult ( bool ) ;
30- impl WaitTimeoutResult {
31- pub fn timed_out ( & self ) -> bool { self . 0 }
32- }
33-
3431pub struct Condvar {
3532 inner : StdCondvar ,
3633}
@@ -63,7 +60,7 @@ impl Condvar {
6360 -> LockResult < ( MutexGuard < ' a , T > , WaitTimeoutResult ) > {
6461 let mutex = guard. mutex ;
6562 self . inner . wait_timeout_while ( guard. into_inner ( ) , dur, condition) . map_err ( |_| ( ) )
66- . map ( |( lock, e) | ( MutexGuard { mutex, lock } , WaitTimeoutResult ( e . timed_out ( ) ) ) )
63+ . map ( |( lock, e) | ( MutexGuard { mutex, lock } , e ) )
6764 }
6865
6966 pub fn notify_all ( & self ) { self . inner . notify_all ( ) ; }
You can’t perform that action at this time.
0 commit comments