rust/hg-core/src/revlog/node.rs
changeset 48421 2097f63575a5
parent 46744 b1f2c2b336ec
child 49175 34decbaf4da3
equal deleted inserted replaced
48420:c7c23bb036c9 48421:2097f63575a5
   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 ///