diff options
author | nickelc <constantin.nickel@gmail.com> | 2023-03-05 23:24:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 17:24:24 -0500 |
commit | 5e4faabfd36b3fae69dc15b2f39f18196bd5154c (patch) | |
tree | 7dfed17bf3bde8412ed2657fbdc1de696c6aa41a /src/features | |
parent | a8446c53bb32fa7c2d1fc4cddb4720b737b2cc8a (diff) |
Return the `GitRemoteRepo` type directly (#1328)
The type is unnecessarily wrapped and it's the only use for
`GitConfigEntry::GitRemote` enum variant.
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/hyperlinks.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/features/hyperlinks.rs b/src/features/hyperlinks.rs index 118d8355..841c7518 100644 --- a/src/features/hyperlinks.rs +++ b/src/features/hyperlinks.rs @@ -6,7 +6,7 @@ use regex::{Captures, Regex}; use crate::config::Config; use crate::features::OptionValueFunction; -use crate::git_config::{GitConfig, GitConfigEntry, GitRemoteRepo}; +use crate::git_config::{GitConfig, GitRemoteRepo}; pub fn make_feature() -> Vec<(String, OptionValueFunction)> { builtin_feature!([ @@ -32,7 +32,7 @@ pub fn format_commit_line_with_osc8_commit_hyperlink<'a>( format_osc8_hyperlink(&commit_link_format.replace("{commit}", commit), commit); format!("{prefix}{formatted_commit}{suffix}") }) - } else if let Some(GitConfigEntry::GitRemote(repo)) = config + } else if let Some(repo) = config .git_config .as_ref() .and_then(GitConfig::get_remote_url) |