Skip to content

Commit 6fe2d1d

Browse files
author
Vitali Lovich
committed
Misc fixes
Switch feature guards to unstable Add missing semicolon Remove mut that's no longer necessary
1 parent 97df227 commit 6fe2d1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/sync/condvar.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl Condvar {
263263
/// // As long as the value inside the `Mutex` is false, we wait.
264264
/// cvar.wait_until(lock.lock().unwrap(), |started| { started });
265265
/// ```
266-
#[stable(feature = "wait_until", since = "1.24")]
266+
#[unstable(feature = "wait_until", issue = "47960")]
267267
pub fn wait_until<'a, T, F>(&self, mut guard: MutexGuard<'a, T>,
268268
mut condition: F)
269269
-> LockResult<MutexGuard<'a, T>>
@@ -470,9 +470,9 @@ impl Condvar {
470470
/// }
471471
/// // access the locked mutex via result.0
472472
/// ```
473-
#[stable(feature = "wait_timeout_until", since = "1.24")]
473+
#[unstable(feature = "wait_timeout_until", issue = "47960")]
474474
pub fn wait_timeout_until<'a, T, F>(&self, mut guard: MutexGuard<'a, T>,
475-
mut dur: Duration, mut condition: F)
475+
dur: Duration, mut condition: F)
476476
-> LockResult<(MutexGuard<'a, T>, WaitTimeoutResult)>
477477
where F: FnMut(&mut T) -> bool {
478478
let start = Instant::now();
@@ -483,7 +483,7 @@ impl Condvar {
483483
let timeout = match dur.checked_sub(start.elapsed()) {
484484
Some(timeout) => timeout,
485485
None => return Ok((guard, WaitTimeoutResult(true))),
486-
}
486+
};
487487
guard = self.wait_timeout(guard, timeout)?.0;
488488
}
489489
}

0 commit comments

Comments
 (0)