From f41fce9e310f8e858a76a2c3951249b2cc633a2b Mon Sep 17 00:00:00 2001 From: Shane Celis Date: Sun, 14 Apr 2024 17:55:48 -0400 Subject: [PATCH] feature: Make Fid cloneable. (#26) --- src/fid.rs | 2 ++ src/internal_data_structure/popcount_table.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/fid.rs b/src/fid.rs index ef66ff2b..934a221d 100644 --- a/src/fid.rs +++ b/src/fid.rs @@ -94,6 +94,7 @@ use super::internal_data_structure::popcount_table::PopcountTable; /// In summary: /// /// _rank() = (value of left chunk) + (value of left block) + (value of table keyed by inner block bits)_. +#[derive(Clone)] pub struct Fid { /// Raw data. byte_vec: Vec, @@ -116,6 +117,7 @@ pub struct FidIter<'iter> { i: u64, } +#[derive(Clone)] /// Collection of Chunk. struct Chunks { chunks: Vec, diff --git a/src/internal_data_structure/popcount_table.rs b/src/internal_data_structure/popcount_table.rs index 0db1f271..43c1938b 100644 --- a/src/internal_data_structure/popcount_table.rs +++ b/src/internal_data_structure/popcount_table.rs @@ -1,4 +1,5 @@ /// Cache table of `popcount` results. +#[derive(Clone)] pub struct PopcountTable { bit_length: u8,