rust/hg-core/src/revlog/index.rs
changeset 49092 d200ecb76c72
parent 48546 e91aa800ae5b
child 49093 2a9a55ffe24f
equal deleted inserted replaced
49091:9b5334c1e499 49092:d200ecb76c72
   321         pub fn new() -> Self {
   321         pub fn new() -> Self {
   322             Self {
   322             Self {
   323                 is_first: false,
   323                 is_first: false,
   324                 is_inline: false,
   324                 is_inline: false,
   325                 is_general_delta: true,
   325                 is_general_delta: true,
   326                 version: 2,
   326                 version: 1,
   327                 offset: 0,
   327                 offset: 0,
   328                 compressed_len: 0,
   328                 compressed_len: 0,
   329                 uncompressed_len: 0,
   329                 uncompressed_len: 0,
   330                 base_revision_or_base_of_delta_chain: 0,
   330                 base_revision_or_base_of_delta_chain: 0,
   331             }
   331             }
   515 
   515 
   516     #[test]
   516     #[test]
   517     fn version_test() {
   517     fn version_test() {
   518         let bytes = IndexEntryBuilder::new()
   518         let bytes = IndexEntryBuilder::new()
   519             .is_first(true)
   519             .is_first(true)
   520             .with_version(1)
   520             .with_version(2)
   521             .build();
   521             .build();
   522 
   522 
   523         assert_eq!(get_version(&bytes), 1)
   523         assert_eq!(get_version(&bytes), 2)
   524     }
   524     }
   525 }
   525 }
   526 
   526 
   527 #[cfg(test)]
   527 #[cfg(test)]
   528 pub use tests::IndexEntryBuilder;
   528 pub use tests::IndexEntryBuilder;