Skip to content

Bound N on Clone, not Copy

Compare
Choose a tag to compare
@coriolinus coriolinus released this 08 Aug 08:41
· 139 commits to master since this release
3d9f65b

All Copy types are also Clone types where the clone bound happens to be really cheap. Bounding N: Clone instead of N: Copy means that we can use numeric types like num::BigInteger, which are not Copy, and things still work. You pay a bit more runtime cost, but if you're using a non-default counter type, presumably you know the costs of your actions.