Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/bitwarden-vault/src/collection_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(not(feature = "wasm"))]
use std::collections::HashMap;

use bitwarden_collections::{
collection::{Collection, CollectionView},
tree::{NodeItem, Tree},
Expand Down Expand Up @@ -80,6 +83,15 @@ impl CollectionViewNodeItem {
map
})
}

#[cfg(not(feature = "wasm"))]
pub fn get_ancestors(&self) -> HashMap<String, String> {
self.node_item
.ancestors
.iter()
.map(|(id, name)| (id.to_string(), name.to_string()))
.collect()
}
}

#[cfg_attr(feature = "wasm", wasm_bindgen)]
Expand Down