aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcs/git.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-02-21 10:29:27 -0500
committerJesse Luehrs <doy@tozt.net>2018-02-21 10:29:27 -0500
commit124b7fdc0571c53926e99e0c8b256e1ec747c6b2 (patch)
tree642901871fbf2d22ab78d3fdc2bf6778143326b3 /src/vcs/git.rs
parent1bd75b8ac9ef3e502e61d95cb6f179f31d18e2c3 (diff)
downloadfancy-prompt-124b7fdc0571c53926e99e0c8b256e1ec747c6b2.tar.gz
fancy-prompt-124b7fdc0571c53926e99e0c8b256e1ec747c6b2.zip
clippy
Diffstat (limited to 'src/vcs/git.rs')
-rw-r--r--src/vcs/git.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vcs/git.rs b/src/vcs/git.rs
index 749d498..2eced81 100644
--- a/src/vcs/git.rs
+++ b/src/vcs/git.rs
@@ -15,7 +15,7 @@ pub struct GitInfo {
}
impl GitInfo {
- pub fn new(git: git2::Repository) -> GitInfo {
+ pub fn new(git: &git2::Repository) -> GitInfo {
let mut modified_statuses = git2::Status::empty();
modified_statuses.insert(git2::STATUS_WT_DELETED);
modified_statuses.insert(git2::STATUS_WT_MODIFIED);
@@ -168,7 +168,7 @@ pub fn detect() -> Option<Box<super::VcsInfo>> {
});
if let Some(git) = git {
- Some(Box::new(GitInfo::new(git)))
+ Some(Box::new(GitInfo::new(&git)))
}
else {
None