mirror of
https://github.com/openharmony/third_party_rust_parking_lot.git
synced 2026-07-01 21:03:59 -04:00
Use saturating_add for WaitWhileResult
This commit is contained in:
+1
-1
@@ -411,7 +411,7 @@ impl Condvar {
|
||||
let mut timeout_result = WaitTimeoutResult(false);
|
||||
|
||||
while !timeout_result.timed_out() && condition(mutex_guard.deref_mut()) {
|
||||
result.0 += 1;
|
||||
result.0 = result.0.saturating_add(1);
|
||||
timeout_result =
|
||||
self.wait_until_internal(unsafe { MutexGuard::mutex(mutex_guard).raw() }, timeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user