1
2
3
4
5
6
7
8
9
10
use crate::Fragment;
use alloc::vec::Vec;

impl<T: Clone> Clone for Fragment<T> {
    fn clone(&self) -> Self {
        let mut data = Vec::with_capacity(self.data.capacity());
        data.extend(self.data.iter().cloned());
        data.into()
    }
}