summaryrefslogtreecommitdiffstats
path: root/src/dir.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-02-01 02:14:31 +0000
committerBen S <ogham@bsago.me>2015-02-01 02:14:31 +0000
commit5611a5768a832c0373a7d4da95175b651565f80a (patch)
tree7fd98f3ffbbf8c78daebcfb79f5f1c7cee2e2c52 /src/dir.rs
parent3242cb216ace7515812dd23432ccf784964c7587 (diff)
Recurse into directories
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dir.rs b/src/dir.rs
index f9f8437..d938cbb 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -21,11 +21,11 @@ impl Dir {
/// Create a new Dir object filled with all the files in the directory
/// pointed to by the given path. Fails if the directory can't be read, or
/// isn't actually a directory.
- pub fn readdir(path: Path) -> IoResult<Dir> {
- fs::readdir(&path).map(|paths| Dir {
+ pub fn readdir(path: &Path) -> IoResult<Dir> {
+ fs::readdir(path).map(|paths| Dir {
contents: paths,
path: path.clone(),
- git: Git::scan(&path).ok(),
+ git: Git::scan(path).ok(),
})
}