summaryrefslogtreecommitdiffstats
path: root/src/dir.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-02-01 09:39:30 +0000
committerBen S <ogham@bsago.me>2015-02-01 09:39:30 +0000
commita2020c645784ae69329aaf6ccfd554812e9f1f8d (patch)
tree981ebd39eb888acf5176343444972541b353eefe /src/dir.rs
parent5611a5768a832c0373a7d4da95175b651565f80a (diff)
What the heck?
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dir.rs b/src/dir.rs
index d938cbb..8a567fd 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -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.