Show More
@@ -130,8 +130,7 b' impl DirstateMap {' | |||
|
130 | 130 | } |
|
131 | 131 | |
|
132 | 132 | if let Some(ref mut file_fold_map) = self.file_fold_map { |
|
133 | file_fold_map | |
|
134 | .remove::<Vec<u8>>(filename.to_ascii_uppercase().as_ref()); | |
|
133 | file_fold_map.remove(&filename.to_ascii_uppercase()); | |
|
135 | 134 | } |
|
136 | 135 | self.state_map.insert( |
|
137 | 136 | filename.to_owned(), |
@@ -153,10 +152,7 b' impl DirstateMap {' | |||
|
153 | 152 | filename: &[u8], |
|
154 | 153 | old_state: EntryState, |
|
155 | 154 | ) -> Result<bool, DirstateMapError> { |
|
156 | let exists = self | |
|
157 | .state_map | |
|
158 | .remove::<Vec<u8>>(filename.to_owned().as_ref()) | |
|
159 | .is_some(); | |
|
155 | let exists = self.state_map.remove(filename).is_some(); | |
|
160 | 156 | |
|
161 | 157 | if exists { |
|
162 | 158 | if old_state != EntryState::Removed { |
@@ -169,11 +165,9 b' impl DirstateMap {' | |||
|
169 | 165 | } |
|
170 | 166 | } |
|
171 | 167 | if let Some(ref mut file_fold_map) = self.file_fold_map { |
|
172 | file_fold_map | |
|
173 | .remove::<Vec<u8>>(filename.to_ascii_uppercase().as_ref()); | |
|
168 | file_fold_map.remove(&filename.to_ascii_uppercase()); | |
|
174 | 169 | } |
|
175 | self.non_normal_set | |
|
176 | .remove::<Vec<u8>>(filename.to_owned().as_ref()); | |
|
170 | self.non_normal_set.remove(filename); | |
|
177 | 171 | |
|
178 | 172 | Ok(exists) |
|
179 | 173 | } |
@@ -251,12 +245,12 b' impl DirstateMap {' | |||
|
251 | 245 | |
|
252 | 246 | pub fn has_tracked_dir(&mut self, directory: &[u8]) -> bool { |
|
253 | 247 | self.set_dirs(); |
|
254 |
self.dirs.as_ref().unwrap().contains(directory |
|
|
248 | self.dirs.as_ref().unwrap().contains(directory) | |
|
255 | 249 | } |
|
256 | 250 | |
|
257 | 251 | pub fn has_dir(&mut self, directory: &[u8]) -> bool { |
|
258 | 252 | self.set_all_dirs(); |
|
259 |
self.all_dirs.as_ref().unwrap().contains(directory |
|
|
253 | self.all_dirs.as_ref().unwrap().contains(directory) | |
|
260 | 254 | } |
|
261 | 255 | |
|
262 | 256 | pub fn parents( |
General Comments 0
You need to be logged in to leave comments.
Login now