Open arthurprs opened 11 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
dc024b5
) 96.29% compared to head (6ac8cbd
) 96.29%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As discussed previously in #80. This should be a valid public api in persistent data-structures. It's already in im and in the stdlib.
It's valuable in a some cases as an identity check but also as a fast-path to avoid expensive set computations (intersection, union, etc.). In our application, we take great advantage of the latter.
Furthermore, persistent data structures in practice always(?) have efficient ptr_eq implementations, otherwise it would imply cloning isn't cheap or can't be done with a non-mut pointer. So it's likely to be future-proof even.