diff options
author | Ben S <ogham@bsago.me> | 2015-02-01 09:39:30 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-02-01 09:39:30 +0000 |
commit | a2020c645784ae69329aaf6ccfd554812e9f1f8d (patch) | |
tree | 981ebd39eb888acf5176343444972541b353eefe /src/dir.rs | |
parent | 5611a5768a832c0373a7d4da95175b651565f80a (diff) |
What the heck?
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -102,12 +102,11 @@ impl Git { /// path that gets passed in. This is used for getting the status of /// directories, which don't really have an 'official' status. fn dir_status(&self, dir: &Path) -> String { - let status = self.statuses.iter() - .filter(|p| p.0.starts_with(dir.as_vec())) - .fold(git2::Status::empty(), |a, b| a | b.1); - match status { - s => format!("{}{}", Git::index_status(s), Git::working_tree_status(s)), - } + let s = self.statuses.iter() + .filter(|p| p.0.starts_with(dir.as_vec())) + .fold(git2::Status::empty(), |a, b| a | b.1); + + format!("{}{}", Git::index_status(s), Git::working_tree_status(s)) } /// The character to display if the file has been modified, but not staged. |