The symbol pool implemented in basic.rs uses a value's hash as the key to pool's HashMap instance, which effectively bypasses any collision handling that would normally be provided by the map. This design was meant to avoid the overhead and additional complexity of using something like Rc where shared ownership isn't actually required — but clearly needs some rethinking.
The symbol pool implemented in
basic.rsuses a value's hash as the key to pool'sHashMapinstance, which effectively bypasses any collision handling that would normally be provided by the map. This design was meant to avoid the overhead and additional complexity of using something likeRcwhere shared ownership isn't actually required — but clearly needs some rethinking.