summaryrefslogtreecommitdiffstats
path: root/src/dir.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2014-12-12 14:06:48 +0000
committerBen S <ogham@bsago.me>2014-12-12 14:06:48 +0000
commit66339e7a1546a92b1c1fa2935384143e28e11098 (patch)
tree69e058326dbe551dcc1181cecc6d87ce5493e564 /src/dir.rs
parent4484982734e9c11c7c3845321e9043ece7c7aeb9 (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.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dir.rs b/src/dir.rs
index debd06a..16f80ad 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -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),
}