remove values()
This commit is contained in:
committed by
Jeff Washington (jwash)
parent
c43c90665e
commit
c80d9cb4e3
@ -89,22 +89,6 @@ impl<T: Clone + Copy> Bucket<T> {
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn values(&self) -> Vec<Vec<T>> {
|
|
||||||
let mut rv = vec![];
|
|
||||||
for i in 0..self.index.num_cells() {
|
|
||||||
if self.index.uid(i) == 0 {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let ix: &IndexEntry = self.index.get(i);
|
|
||||||
let val = ix.read_value(self);
|
|
||||||
if val.is_none() {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
rv.push(val.unwrap().0.to_vec());
|
|
||||||
}
|
|
||||||
rv
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn find_entry(&self, key: &Pubkey) -> Option<(&IndexEntry, u64)> {
|
pub fn find_entry(&self, key: &Pubkey) -> Option<(&IndexEntry, u64)> {
|
||||||
Self::bucket_find_entry(&self.index, key, self.random)
|
Self::bucket_find_entry(&self.index, key, self.random)
|
||||||
}
|
}
|
||||||
|
@ -147,11 +147,6 @@ impl<T: Clone + Copy + Debug> BucketMap<T> {
|
|||||||
Some(self.buckets[ix].read().unwrap().as_ref()?.keys())
|
Some(self.buckets[ix].read().unwrap().as_ref()?.keys())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the values for bucket `ix`
|
|
||||||
pub fn values(&self, ix: usize) -> Option<Vec<Vec<T>>> {
|
|
||||||
Some(self.buckets[ix].read().unwrap().as_ref()?.values())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the values for Pubkey `key`
|
/// Get the values for Pubkey `key`
|
||||||
pub fn read_value(&self, key: &Pubkey) -> Option<(Vec<T>, RefCount)> {
|
pub fn read_value(&self, key: &Pubkey) -> Option<(Vec<T>, RefCount)> {
|
||||||
let ix = self.bucket_ix(key);
|
let ix = self.bucket_ix(key);
|
||||||
|
Reference in New Issue
Block a user