bitvec
bitvec copied to clipboard
Implement Clone::clone_from for BitVec
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.