diff options
author | Ben S <ogham@bsago.me> | 2014-12-12 14:06:48 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2014-12-12 14:06:48 +0000 |
commit | 66339e7a1546a92b1c1fa2935384143e28e11098 (patch) | |
tree | 69e058326dbe551dcc1181cecc6d87ce5493e564 /src/dir.rs | |
parent | 4484982734e9c11c7c3845321e9043ece7c7aeb9 (diff) |
Miscellaneous little optimisations
- Prefer iter over into_iter where appropriate
- Cut down on cloning
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -24,7 +24,7 @@ impl Dir { let mut files = vec![]; for path in self.contents.iter() { - match File::from_path(path.clone(), Some(self)) { + match File::from_path(path, Some(self)) { Ok(file) => files.push(file), Err(e) => println!("{}: {}", path.display(), e), } |