Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/dirstate.rs @ 46595:98a455a62699
rust: Make `DirstateParents`?s fields typed `Node`s
Instead of plain byte arrays.
Differential Revision: https://phab.mercurial-scm.org/D10006
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 17 Feb 2021 12:24:53 +0100 |
parents | f88e8ae0aa8f |
children | 441024b279a6 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate.rs Wed Feb 17 12:06:56 2021 +0100 +++ b/rust/hg-core/src/dirstate.rs Wed Feb 17 12:24:53 2021 +0100 @@ -6,6 +6,7 @@ // GNU General Public License version 2 or any later version. use crate::errors::HgError; +use crate::revlog::Node; use crate::{utils::hg_path::HgPathBuf, FastHashMap}; use bytes_cast::{unaligned, BytesCast}; use std::collections::hash_map; @@ -21,8 +22,8 @@ #[derive(Debug, PartialEq, Clone, BytesCast)] #[repr(C)] pub struct DirstateParents { - pub p1: [u8; 20], - pub p2: [u8; 20], + pub p1: Node, + pub p2: Node, } /// The C implementation uses all signed types. This will be an issue