Mercurial > hg
comparison rust/hg-core/src/dirstate_tree/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 | 9b2a51b2c36a |
children | 2ac0e6b23222 |
comparison
equal
deleted
inserted
replaced
48047:9b2a51b2c36a | 48048:76f1c76186a1 |
---|---|
843 } | 843 } |
844 let entry = DirstateEntry::new_removed(size); | 844 let entry = DirstateEntry::new_removed(size); |
845 Ok(self.add_or_remove_file(filename, old_state, entry)?) | 845 Ok(self.add_or_remove_file(filename, old_state, entry)?) |
846 } | 846 } |
847 | 847 |
848 fn drop_file(&mut self, filename: &HgPath) -> Result<bool, DirstateError> { | 848 fn drop_file(&mut self, filename: &HgPath) -> Result<(), DirstateError> { |
849 let was_tracked = self | 849 let was_tracked = self |
850 .get(filename)? | 850 .get(filename)? |
851 .map_or(false, |e| e.state().is_tracked()); | 851 .map_or(false, |e| e.state().is_tracked()); |
852 struct Dropped { | 852 struct Dropped { |
853 was_tracked: bool, | 853 was_tracked: bool, |
944 self.nodes_with_entry_count -= 1 | 944 self.nodes_with_entry_count -= 1 |
945 } | 945 } |
946 if dropped.had_copy_source { | 946 if dropped.had_copy_source { |
947 self.nodes_with_copy_source_count -= 1 | 947 self.nodes_with_copy_source_count -= 1 |
948 } | 948 } |
949 Ok(dropped.had_entry) | |
950 } else { | 949 } else { |
951 debug_assert!(!was_tracked); | 950 debug_assert!(!was_tracked); |
952 Ok(false) | 951 } |
953 } | 952 Ok(()) |
954 } | 953 } |
955 | 954 |
956 fn clear_ambiguous_times( | 955 fn clear_ambiguous_times( |
957 &mut self, | 956 &mut self, |
958 filenames: Vec<HgPathBuf>, | 957 filenames: Vec<HgPathBuf>, |