orx_fixed_vec/common_traits/
clone.rs1use crate::FixedVec;
2use alloc::vec::Vec;
3
4impl<T> Clone for FixedVec<T>
5where
6 T: Clone,
7{
8 fn clone(&self) -> Self {
9 let mut data = Vec::with_capacity(self.data.capacity());
10 data.extend_from_slice(&self.data);
11 Self { data }
12 }
13}