Fix obvious opportunistic_context_locking typo.

This commit is contained in:
4lDO2
2026-09-07 20:33:38 +02:00
parent 3c13c8c4c9
commit 50b19d1b1f
+2 -2
View File
@@ -50,7 +50,7 @@ pub const STEAL_INTERVAL: usize = 2;
pub const MAX_STEAL: usize = 2;
unsafe fn opportunistic_write_arc(lock: &Arc<ContextLock>) -> Option<ArcContextLockWriteGuard> {
if cfg!(opportunistic_context_locking) {
if cfg!(feature = "opportunistic_context_locking") {
unsafe { lock.try_write_arc() }
} else {
Some(unsafe { lock.write_arc() })
@@ -260,7 +260,7 @@ pub fn switch(token: &mut CleanLockToken) -> SwitchResult {
continue;
};
// TODO: can this happen?
if !cfg!(opportunistic_context_locking)
if !cfg!(feature = "opportunistic_context_locking")
&& Weak::as_ptr(&context_ref.0)
== Arc::as_ptr(&ArcRwLockWriteGuard::rwlock(&prev_context_guard))
{