changeset 48467 | 2097f63575a5 |
parent 46757 | b1f2c2b336ec |
child 49210 | 34decbaf4da3 |
--- a/rust/hg-core/src/revlog/node.rs Thu Dec 02 12:05:36 2021 +0100 +++ b/rust/hg-core/src/revlog/node.rs Thu Dec 02 15:10:03 2021 +0100 @@ -174,6 +174,12 @@ data: self.data, } } + + pub fn pad_to_256_bits(&self) -> [u8; 32] { + let mut bits = [0; 32]; + bits[..NODE_BYTES_LENGTH].copy_from_slice(&self.data); + bits + } } /// The beginning of a binary revision SHA.