Convert a `HashIndex` to an `Option `. - `HASH_INDEX_NONE` → `None` - Valid index → `Some(Hash)`
(&self, index: HashIndex)
| 265 | /// - `HASH_INDEX_NONE` → `None` |
| 266 | /// - Valid index → `Some(Hash)` |
| 267 | pub(super) fn index_to_hash(&self, index: HashIndex) -> FormatResult<Option<Hash>> { |
| 268 | if index == HASH_INDEX_NONE { |
| 269 | return Ok(None); |
| 270 | } |
| 271 | let bytes = self.table.resolve_required(index)?; |
| 272 | Ok(Some(Hash::from_bytes(*bytes))) |
| 273 | } |
| 274 | } |
no test coverage detected