# HG changeset patch # User Yuya Nishihara # Date 2019-08-17 04:55:05 # Node ID 99dff42645242d7b7499028b685b017c6ad4ade9 # Parent 1faa2bed47c69153ffd1619b62371dfcf7d3d2b0 rust-dirstate: use PARENT_SIZE constant where appropriate diff --git a/rust/hg-core/src/dirstate/dirstate_map.rs b/rust/hg-core/src/dirstate/dirstate_map.rs --- a/rust/hg-core/src/dirstate/dirstate_map.rs +++ b/rust/hg-core/src/dirstate/dirstate_map.rs @@ -258,7 +258,7 @@ impl DirstateMap { 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(