diff options
author | Ben S <ogham@bsago.me> | 2015-02-01 02:14:31 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-02-01 02:14:31 +0000 |
commit | 5611a5768a832c0373a7d4da95175b651565f80a (patch) | |
tree | 7fd98f3ffbbf8c78daebcfb79f5f1c7cee2e2c52 /src/dir.rs | |
parent | 3242cb216ace7515812dd23432ccf784964c7587 (diff) |
Recurse into directories
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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(), }) } |