Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/dirstate_tree/dispatch.rs @ 47121:b6339a993b91
rust: Remove handling of `parents` in `DirstateMap`
The Python wrapper class `dirstatemap` can take care of it.
This removes the need to have both `_rustmap` and `_inner_rustmap`.
Differential Revision: https://phab.mercurial-scm.org/D10555
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 30 Apr 2021 15:40:11 +0200 |
parents | d5956136d19d |
children | d8ac62374943 |
comparison
equal
deleted
inserted
replaced
47120:7109a38830c9 | 47121:b6339a993b91 |
---|---|
71 fn has_dir( | 71 fn has_dir( |
72 &mut self, | 72 &mut self, |
73 directory: &HgPath, | 73 directory: &HgPath, |
74 ) -> Result<bool, DirstateMapError>; | 74 ) -> Result<bool, DirstateMapError>; |
75 | 75 |
76 fn parents( | |
77 &mut self, | |
78 file_contents: &[u8], | |
79 ) -> Result<&DirstateParents, DirstateError>; | |
80 | |
81 fn set_parents(&mut self, parents: &DirstateParents); | |
82 | |
83 fn read<'a>( | 76 fn read<'a>( |
84 &mut self, | 77 &mut self, |
85 file_contents: &'a [u8], | 78 file_contents: &'a [u8], |
86 ) -> Result<Option<&'a DirstateParents>, DirstateError>; | 79 ) -> Result<Option<&'a DirstateParents>, DirstateError>; |
87 | 80 |
219 fn has_dir( | 212 fn has_dir( |
220 &mut self, | 213 &mut self, |
221 directory: &HgPath, | 214 directory: &HgPath, |
222 ) -> Result<bool, DirstateMapError> { | 215 ) -> Result<bool, DirstateMapError> { |
223 self.has_dir(directory) | 216 self.has_dir(directory) |
224 } | |
225 | |
226 fn parents( | |
227 &mut self, | |
228 file_contents: &[u8], | |
229 ) -> Result<&DirstateParents, DirstateError> { | |
230 self.parents(file_contents) | |
231 } | |
232 | |
233 fn set_parents(&mut self, parents: &DirstateParents) { | |
234 self.set_parents(parents) | |
235 } | 217 } |
236 | 218 |
237 fn read<'a>( | 219 fn read<'a>( |
238 &mut self, | 220 &mut self, |
239 file_contents: &'a [u8], | 221 file_contents: &'a [u8], |