Mercurial > hg
changeset 45590:11f3c3f408fd
hg-core: minor code style change (D8958#inline-14993 followup)
Differential Revision: https://phab.mercurial-scm.org/D9083
author | Antoine cezar<acezar@chwitlabs.fr> |
---|---|
date | Mon, 28 Sep 2020 13:46:14 +0200 |
parents | 3d5b2b8e93fd |
children | f38adf8b0711 |
files | rust/hg-core/src/revlog/index.rs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/index.rs Thu Sep 24 09:32:07 2020 +0200 +++ b/rust/hg-core/src/revlog/index.rs Mon Sep 28 13:46:14 2020 +0200 @@ -21,7 +21,7 @@ let mut offset: usize = 0; let mut offsets = Vec::new(); - while (bytes.len() - offset) >= INDEX_ENTRY_SIZE { + while offset + INDEX_ENTRY_SIZE <= bytes.len() { offsets.push(offset); let end = offset + INDEX_ENTRY_SIZE; let entry = IndexEntry {