Skip to content

Commit 9d717cf

Browse files
committed
Add 'into_explicit_map' in 'ImplicitSkyMapArrayRef' [skip ci]
1 parent 3dedd38 commit 9d717cf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/nested/map/skymap/implicit.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ impl<'a, H: HHash, V: SkyMapValue + 'a> ImplicitSkyMapArrayRef<'a, H, V> {
155155
}
156156
}
157157

158+
pub fn into_explicit_map(self, null_value: V) -> ExplicitSkyMapBTree<H, V> {
159+
let depth = self.depth;
160+
let btreemap: BTreeMap<H, V> = self
161+
.owned_entries()
162+
.filter(move |(_k, v)| null_value.ne(v))
163+
.collect();
164+
ExplicitSkyMapBTree::new(depth, btreemap)
165+
}
166+
158167
/*pub fn par_add(mut self, rhs: Self, pool: &ThreadPool) -> Self {
159168
pool.install(|| {
160169
self

0 commit comments

Comments
 (0)