pub fn clone(self: *const Self, new_allocator: Allocator) !Self
Creates a duplicate of this bit set, using the new allocator.
self: *const Self
new_allocator: Allocator
794 795 796 797 798 799 800
pub fn clone(self: *const Self, new_allocator: Allocator) !Self { const num_masks = numMasks(self.bit_length); var copy = Self{}; try copy.resize(new_allocator, self.bit_length, false); @memcpy(copy.masks[0..num_masks], self.masks[0..num_masks]); return copy; }
Creates a duplicate of this bit set, using the new allocator.