changeset 42814:99dff4264524

rust-dirstate: use PARENT_SIZE constant where appropriate
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Aug 2019 13:55:05 +0900
parents 1faa2bed47c6
children 5399532510ae
files rust/hg-core/src/dirstate/dirstate_map.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/dirstate_map.rs	Sat Aug 17 13:27:11 2019 +0900
+++ b/rust/hg-core/src/dirstate/dirstate_map.rs	Sat Aug 17 13:55:05 2019 +0900
@@ -258,7 +258,7 @@
             return Ok(parents.clone());
         }
         let parents;
-        if file_contents.len() == 40 {
+        if file_contents.len() == PARENT_SIZE * 2 {
             parents = DirstateParents {
                 p1: copy_into_array(&file_contents[..PARENT_SIZE]),
                 p2: copy_into_array(