Closed Zoybean closed 11 months ago
What type of T
do you have?
It's not something I can share directly, but it represents a record in a time-series. The reason I want this is not so much because I can't clone the data, but because the things I'm doing to it are easier if I operate only on references, not owned data (maybe solvable if we had lending iterators, but that's probably beside the point)
similar::Change
allows owned access to the contained value by cloning it, in thevalue
method. Could it also provide by-reference access?This might lead to issues if
T
has interior mutability, but I figure if someone is diffing something with interior mutability, this is the least of your worries.