Mercurial > hg
comparison rust/hg-cpython/src/dirstate/dispatch.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 | 1766130fe9ba |
children | ed1583a845d2 |
comparison
equal
deleted
inserted
replaced
47331:0252600fd1cf | 47332:4ee9f419c52e |
---|---|
171 | 171 |
172 fn contains_key(&self, key: &HgPath) -> bool { | 172 fn contains_key(&self, key: &HgPath) -> bool { |
173 self.get().contains_key(key) | 173 self.get().contains_key(key) |
174 } | 174 } |
175 | 175 |
176 fn get(&self, key: &HgPath) -> Option<&DirstateEntry> { | 176 fn get(&self, key: &HgPath) -> Option<DirstateEntry> { |
177 self.get().get(key) | 177 self.get().get(key) |
178 } | 178 } |
179 | 179 |
180 fn iter(&self) -> StateMapIter<'_> { | 180 fn iter(&self) -> StateMapIter<'_> { |
181 self.get().iter() | 181 self.get().iter() |