summaryrefslogtreecommitdiffstats
path: root/src/git.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/git.rs')
-rw-r--r--src/git.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/git.rs b/src/git.rs
index a14ac50..addc4a0 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -34,10 +34,7 @@ fn git_ok(cwd: Option<&Path>, args: &[&str]) -> bool {
pub fn ls_remote_head(url: &str) -> Result<Option<String>> {
match git(None, &["ls-remote", url, "HEAD"]) {
- Ok(out) => {
- let sha = out.split_whitespace().next().filter(|s| s.len() >= 7).map(std::string::ToString::to_string);
- Ok(sha)
- }
+ Ok(out) => Ok(out.split_whitespace().next().filter(|s| s.len() >= 7).map(std::string::ToString::to_string)),
Err(e) if is_missing_remote(&e) => Ok(None),
Err(e) => Err(e),
}