comparison rust/hg-core/src/dirstate.rs @ 47332:4ee9f419c52e

rust: Return owned instead of borrowed DirstateEntry in DirstateMap APIs This will enable the tree-based DirstateMap to not always have an actual DirstateEntry in memory for all nodes, but construct it on demand. Differential Revision: https://phab.mercurial-scm.org/D10746
author Simon Sapin <simon.sapin@octobus.net>
date Wed, 19 May 2021 13:15:00 +0200
parents cd8ca38fccff
children ed1583a845d2
comparison
equal deleted inserted replaced
47331:0252600fd1cf 47332:4ee9f419c52e
75 /// merge. 75 /// merge.
76 pub const SIZE_FROM_OTHER_PARENT: i32 = -2; 76 pub const SIZE_FROM_OTHER_PARENT: i32 = -2;
77 77
78 pub type StateMap = FastHashMap<HgPathBuf, DirstateEntry>; 78 pub type StateMap = FastHashMap<HgPathBuf, DirstateEntry>;
79 pub type StateMapIter<'a> = 79 pub type StateMapIter<'a> =
80 Box<dyn Iterator<Item = (&'a HgPath, &'a DirstateEntry)> + Send + 'a>; 80 Box<dyn Iterator<Item = (&'a HgPath, DirstateEntry)> + Send + 'a>;
81 81
82 pub type CopyMap = FastHashMap<HgPathBuf, HgPathBuf>; 82 pub type CopyMap = FastHashMap<HgPathBuf, HgPathBuf>;
83 pub type CopyMapIter<'a> = 83 pub type CopyMapIter<'a> =
84 Box<dyn Iterator<Item = (&'a HgPath, &'a HgPath)> + Send + 'a>; 84 Box<dyn Iterator<Item = (&'a HgPath, &'a HgPath)> + Send + 'a>;
85 85