##// END OF EJS Templates
rust: clippy pass...
Raphaël Gomès -
r46181:2a169781 default
parent child Browse files
Show More
@@ -160,7 +160,7 b" impl<'a> FsIter<'a> {"
160 let meta = self.root_dir.join(filename_as_path).symlink_metadata();
160 let meta = self.root_dir.join(filename_as_path).symlink_metadata();
161 match meta {
161 match meta {
162 Ok(ref m) if m.file_type().is_symlink() => true,
162 Ok(ref m) if m.file_type().is_symlink() => true,
163 _ => return false,
163 _ => false,
164 }
164 }
165 }
165 }
166 }
166 }
@@ -182,7 +182,7 b" impl<'a> Iterator for FsIter<'a> {"
182
182
183 fn next(&mut self) -> Option<Self::Item> {
183 fn next(&mut self) -> Option<Self::Item> {
184 // If any paths have already been `Dispatch`-ed, return them
184 // If any paths have already been `Dispatch`-ed, return them
185 while let Some(res) = self.shortcuts.pop_front() {
185 if let Some(res) = self.shortcuts.pop_front() {
186 return Some(res);
186 return Some(res);
187 }
187 }
188
188
@@ -250,7 +250,7 b" fn add_children_to_visit<'a>("
250 ) {
250 ) {
251 to_visit.extend(dir.children.iter().map(|(path, child)| {
251 to_visit.extend(dir.children.iter().map(|(path, child)| {
252 let full_path = join_path(&base_path, &path);
252 let full_path = join_path(&base_path, &path);
253 (Cow::from(full_path), child)
253 (full_path, child)
254 }));
254 }));
255 }
255 }
256
256
@@ -91,9 +91,9 b' impl Node {'
91
91
92 match &mut self.kind {
92 match &mut self.kind {
93 NodeKind::Directory(directory) => {
93 NodeKind::Directory(directory) => {
94 return Node::insert_in_directory(
94 Node::insert_in_directory(
95 directory, new_entry, head, tail,
95 directory, new_entry, head, tail,
96 );
96 )
97 }
97 }
98 NodeKind::File(_) => {
98 NodeKind::File(_) => {
99 unreachable!("The file case has already been handled")
99 unreachable!("The file case has already been handled")
@@ -227,7 +227,7 b' impl Node {'
227 d.children.remove(head);
227 d.children.remove(head);
228 }
228 }
229 res.cleanup =
229 res.cleanup =
230 d.children.len() == 0 && d.was_file.is_none();
230 d.children.is_empty() && d.was_file.is_none();
231 res
231 res
232 } else {
232 } else {
233 empty_result
233 empty_result
@@ -241,7 +241,7 b' impl Node {'
241 if cleanup {
241 if cleanup {
242 d.children.remove(head);
242 d.children.remove(head);
243 }
243 }
244 if d.children.len() == 0 && d.was_file.is_none() {
244 if d.children.is_empty() && d.was_file.is_none() {
245 f.was_directory = None;
245 f.was_directory = None;
246 }
246 }
247
247
@@ -288,7 +288,7 b' impl Node {'
288 }
288 }
289
289
290 RemoveResult {
290 RemoveResult {
291 cleanup: cleanup,
291 cleanup,
292 old_entry: Some(entry),
292 old_entry: Some(entry),
293 }
293 }
294 }
294 }
General Comments 0
You need to be logged in to leave comments. Login now