rust-index: stop calling `with_offset` in the tests
We are not adding any data, so why are we setting any offset?
--- a/rust/hg-core/src/revlog/mod.rs Fri Feb 23 15:57:50 2024 +0100
+++ b/rust/hg-core/src/revlog/mod.rs Mon Feb 26 13:41:02 2024 +0100
@@ -859,7 +859,7 @@
#[cfg(test)]
mod tests {
use super::*;
- use crate::index::{IndexEntryBuilder, INDEX_ENTRY_SIZE};
+ use crate::index::IndexEntryBuilder;
use itertools::Itertools;
#[test]
@@ -897,15 +897,10 @@
.is_first(true)
.with_version(1)
.with_inline(true)
- .with_offset(INDEX_ENTRY_SIZE)
.with_node(node0)
.build();
- let entry1_bytes = IndexEntryBuilder::new()
- .with_offset(INDEX_ENTRY_SIZE)
- .with_node(node1)
- .build();
+ let entry1_bytes = IndexEntryBuilder::new().with_node(node1).build();
let entry2_bytes = IndexEntryBuilder::new()
- .with_offset(INDEX_ENTRY_SIZE)
.with_p1(Revision(0))
.with_p2(Revision(1))
.with_node(node2)
@@ -971,13 +966,9 @@
.is_first(true)
.with_version(1)
.with_inline(true)
- .with_offset(INDEX_ENTRY_SIZE)
.with_node(node0)
.build();
- let entry1_bytes = IndexEntryBuilder::new()
- .with_offset(INDEX_ENTRY_SIZE)
- .with_node(node1)
- .build();
+ let entry1_bytes = IndexEntryBuilder::new().with_node(node1).build();
let contents = vec![entry0_bytes, entry1_bytes]
.into_iter()
.flatten()