The Base32 form of a wire `Hash` (the local path's `Hash::to_base32`).
(hash: &Option<pb::Hash>)
| 523 | |
| 524 | /// The Base32 form of a wire `Hash` (the local path's `Hash::to_base32`). |
| 525 | fn wire_hash_base32(hash: &Option<pb::Hash>) -> String { |
| 526 | hash.as_ref() |
| 527 | .and_then(|h| h.value.clone().try_into().ok()) |
| 528 | .map(|bytes| Merkle(bytes).to_base32()) |
| 529 | .unwrap_or_default() |
| 530 | } |
| 531 | |
| 532 | // --------------------------------------------------------------------------- |
| 533 | // add / record |