bitvec icon indicating copy to clipboard operation
bitvec copied to clipboard

Implement Clone::clone_from for BitVec

Open willcrichton opened this issue 2 years ago • 0 comments
trafficstars

The default implementation of clone_from is just *self = other.clone(), which involves an unnecessary allocation if self.len() == other.len(). This PR provides a Clone::clone_from implementation that calls copy_from_bitslice when applicable.

willcrichton avatar Oct 02 '23 22:10 willcrichton