Opt for FxHashMap<Id,Id> instead of <Id,Option<Id>> and apply requested changes

This commit is contained in:
Ali Bektas 2024-03-04 22:58:49 +01:00
parent a15cc86c64
commit 9c50d129da
3 changed files with 127 additions and 212 deletions

View file

@ -125,13 +125,7 @@ impl FileSetConfig {
/// Get the lexicographically ordered vector of the underlying map.
pub fn roots(&self) -> Vec<(Vec<u8>, u64)> {
let mut stream = self.map.stream();
let mut vc = vec![];
while let Some((pth, idx)) = stream.next() {
vc.push((pth.to_vec(), idx));
}
vc
self.map.stream().into_byte_vec()
}
/// Returns the set index for the given `path`.