Convert a `Position >` to a [`CompactPosition`]. # Errors Returns [`FormatError::HashNotFound`](super::super::error::FormatError::HashNotFound) if the hash isn't in the dedup table.
(&self, pos: &Position<Option<Hash>>)
| 69 | /// Returns [`FormatError::HashNotFound`](super::super::error::FormatError::HashNotFound) |
| 70 | /// if the hash isn't in the dedup table. |
| 71 | pub fn compact_position(&self, pos: &Position<Option<Hash>>) -> FormatResult<CompactPosition> { |
| 72 | let change = self.hash_to_index(&pos.change)?; |
| 73 | Ok(CompactPosition::new(change, pos.pos.get() as u32)) |
| 74 | } |
| 75 | |
| 76 | /// Convert a `GraphNode<Option<Hash>>` to a [`CompactGraphNode`]. |
| 77 | /// |