# HG changeset patch # User Pierre-Yves David # Date 1708951262 -3600 # Node ID c3f2a9b55f59e5896ca6ea36b986f8689b956995 # Parent 69ad1d1d9947390a281a3a0da3014a7205583010 rust-index: stop calling `with_offset` in the tests We are not adding any data, so why are we setting any offset? diff -r 69ad1d1d9947 -r c3f2a9b55f59 rust/hg-core/src/revlog/mod.rs --- 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()