comparison rust/hg-core/src/dirstate/dirstate_map.rs @ 48048:76f1c76186a1

dirstate: Remove return boolean from dirstatemap.dropfile None of the remaining callers use it. Differential Revision: https://phab.mercurial-scm.org/D11491
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 23 Sep 2021 15:26:33 +0200
parents 32ef647821b2
children 2ac0e6b23222
comparison
equal deleted inserted replaced
48047:9b2a51b2c36a 48048:76f1c76186a1
196 /// Remove a file from the dirstate. 196 /// Remove a file from the dirstate.
197 /// Returns `true` if the file was previously recorded. 197 /// Returns `true` if the file was previously recorded.
198 pub fn drop_file( 198 pub fn drop_file(
199 &mut self, 199 &mut self,
200 filename: &HgPath, 200 filename: &HgPath,
201 ) -> Result<bool, DirstateError> { 201 ) -> Result<(), DirstateError> {
202 let old_state = self.get(filename).map(|e| e.state()); 202 let old_state = self.get(filename).map(|e| e.state());
203 let exists = self.state_map.remove(filename).is_some(); 203 let exists = self.state_map.remove(filename).is_some();
204 204
205 if exists { 205 if exists {
206 if old_state != Some(EntryState::Removed) { 206 if old_state != Some(EntryState::Removed) {
214 } 214 }
215 self.get_non_normal_other_parent_entries() 215 self.get_non_normal_other_parent_entries()
216 .0 216 .0
217 .remove(filename); 217 .remove(filename);
218 218
219 Ok(exists) 219 Ok(())
220 } 220 }
221 221
222 pub fn clear_ambiguous_times( 222 pub fn clear_ambiguous_times(
223 &mut self, 223 &mut self,
224 filenames: Vec<HgPathBuf>, 224 filenames: Vec<HgPathBuf>,