Speed up vector removal
This commit is contained in:
@@ -111,7 +111,7 @@ impl WaitCondition {
|
||||
.iter()
|
||||
.position(|c| Weak::as_ptr(c) == Arc::as_ptr(¤t_context_ref))
|
||||
{
|
||||
contexts.remove(index);
|
||||
contexts.swap_remove(index);
|
||||
waited = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user