Skip to content
Snippets Groups Projects
Verified Commit f9e9610d authored by David Mehren's avatar David Mehren
Browse files

Some clippy fixes

parent cfd2c21c
Branches
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ impl<L: PartialEq + Clone + Debug> SuccinctTree<BPTree<L>, L> for BPTree<L> {
Ok(Self {
rankselect: RankSelect::new(bitvec.clone(), superblock_size as usize),
minmax: MinMax::new(bitvec.clone(), 1024),
labels: labels,
labels,
})
}
......@@ -266,7 +266,7 @@ impl<L: PartialEq + Clone + Debug> BPTree<L> {
Ok(Self {
minmax: MinMax::new(rankselect.bits().clone(), 1024),
labels: Vec::with_capacity(rankselect.bits().len() as usize),
rankselect: rankselect,
rankselect,
})
}
......
......@@ -188,8 +188,8 @@ impl<L: PartialEq + Clone + Debug> SuccinctTree<LOUDSTree<L>, L> for LOUDSTree<L
if self.is_leaf(child_index).unwrap() {
label_index -= 1;
}
let my_label = self.labels.get(label_index as usize).unwrap().clone();
if my_label == label {
let my_label = &self.labels[label_index as usize];
if *my_label == label {
return Ok(child_index);
}
}
......@@ -247,7 +247,7 @@ impl<L: PartialEq + Clone + Debug> LOUDSTree<L> {
let rankselect: RankSelect = deserialize(&file).context("Error while deserializing tree.")?;
Ok(Self {
labels: Vec::with_capacity(rankselect.bits().len() as usize),
rankselect: rankselect,
rankselect,
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment