MCPcopy Create free account
hub / github.com/DegenSugarBoo/OpenBook / pane_tile_map

Function pane_tile_map

src/workspace.rs:140–148  ·  view source on GitHub ↗
(tree: &Tree<PaneKind>)

Source from the content-addressed store, hash-verified

138}
139
140pub fn pane_tile_map(tree: &Tree<PaneKind>) -> HashMap<PaneKind, TileId> {
141 let mut ids = HashMap::with_capacity(PaneKind::ALL.len());
142 for (tile_id, tile) in tree.tiles.iter() {
143 if let Tile::Pane(pane) = tile {
144 ids.insert(*pane, *tile_id);
145 }
146 }
147 ids
148}
149
150pub fn ensure_all_panes(tree: &mut Tree<PaneKind>) -> HashMap<PaneKind, TileId> {
151 if tree.root.is_none() {

Callers 3

ensure_all_panesFunction · 0.85
tree_from_legacy_prefsFunction · 0.85

Calls

no outgoing calls

Tested by 1