equal
deleted
inserted
replaced
171 pub fn short(&self) -> NodePrefix { |
171 pub fn short(&self) -> NodePrefix { |
172 NodePrefix { |
172 NodePrefix { |
173 nybbles_len: SHORT_PREFIX_DEFAULT_NYBBLES_LENGTH, |
173 nybbles_len: SHORT_PREFIX_DEFAULT_NYBBLES_LENGTH, |
174 data: self.data, |
174 data: self.data, |
175 } |
175 } |
|
176 } |
|
177 |
|
178 pub fn pad_to_256_bits(&self) -> [u8; 32] { |
|
179 let mut bits = [0; 32]; |
|
180 bits[..NODE_BYTES_LENGTH].copy_from_slice(&self.data); |
|
181 bits |
176 } |
182 } |
177 } |
183 } |
178 |
184 |
179 /// The beginning of a binary revision SHA. |
185 /// The beginning of a binary revision SHA. |
180 /// |
186 /// |