(&mut self, o: &Self)
| 120 | |
| 121 | #[inline] |
| 122 | fn clone_from(&mut self, o: &Self) { |
| 123 | let iter = self |
| 124 | .data |
| 125 | .as_slice_mut() |
| 126 | .iter_mut() |
| 127 | .zip(o.data.as_slice()) |
| 128 | .take(self.len.max(o.len) as usize); |
| 129 | for (dst, src) in iter { |
| 130 | dst.clone_from(src) |
| 131 | } |
| 132 | if let Some(to_drop) = |
| 133 | self.data.as_slice_mut().get_mut((o.len as usize)..(self.len as usize)) |
| 134 | { |
| 135 | to_drop.iter_mut().for_each(|x| drop(core::mem::take(x))); |
| 136 | } |
| 137 | self.len = o.len; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | impl<A> Copy for ArrayVec<A> |
nothing calls this directly
no test coverage detected