diff options
Diffstat (limited to 'src/git_config/mod.rs')
-rw-r--r-- | src/git_config/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/git_config/mod.rs b/src/git_config/mod.rs index 8246df4a..60fb0a62 100644 --- a/src/git_config/mod.rs +++ b/src/git_config/mod.rs @@ -96,17 +96,13 @@ impl GitConfig { } } - pub fn get_remote_url(&self) -> Option<GitConfigEntry> { + pub fn get_remote_url(&self) -> Option<GitRemoteRepo> { self.repo .as_ref()? .find_remote("origin") .ok()? .url() - .and_then(|url| { - GitRemoteRepo::from_str(url) - .ok() - .map(GitConfigEntry::GitRemote) - }) + .and_then(|url| GitRemoteRepo::from_str(url).ok()) } pub fn for_each<F>(&self, regex: &str, mut f: F) |