Stonks
Description
This crate provides sets that allow borrowing while inserting entries.
While inserting entries despite referencing other entries in the same set is allowed, removing entries is not possible as it may invalidate references that are held to the entry that is removed.
Example
Problematic Code
The following code won't work:
use HashSet;
The Solution
Using Stonks, we can do the following thanks to interior mutability:
use Set;