# HG changeset patch # User Raphaël Gomès # Date 1722258232 -7200 # Node ID 6f94dc3cf8cfa404353ed2549f4b8a61eeca0fa1 # Parent e01e84e5e426e7ece0084c07337f9d7f6c3de023 rust-index: use `IndexEntry::offset` to compute read segments This only matters for inline revlogs where the impact is debatable, but this is what the C index does. diff -r e01e84e5e426 -r 6f94dc3cf8cf rust/hg-core/src/revlog/index.rs --- a/rust/hg-core/src/revlog/index.rs Thu Oct 10 10:34:51 2024 +0200 +++ b/rust/hg-core/src/revlog/index.rs Mon Jul 29 15:03:52 2024 +0200 @@ -1006,11 +1006,10 @@ } let last_rev = revs[revs.len() - 1]; let last_entry = &self.get_entry(last_rev).unwrap(); - let end = self.start(last_rev, last_entry) - + last_entry.compressed_len() as usize; + let end = last_entry.offset() + last_entry.compressed_len() as usize; let first_rev = revs.iter().find(|r| r.0 != NULL_REVISION.0).unwrap(); let first_entry = self.get_entry(*first_rev).unwrap(); - let start = self.start(*first_rev, &first_entry); + let start = first_entry.offset(); end - start }