diff options
Diffstat (limited to 'crates/shirabe/src/repository/repository_factory.rs')
| -rw-r--r-- | crates/shirabe/src/repository/repository_factory.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/repository/repository_factory.rs b/crates/shirabe/src/repository/repository_factory.rs index 5543a9e..71b1471 100644 --- a/crates/shirabe/src/repository/repository_factory.rs +++ b/crates/shirabe/src/repository/repository_factory.rs @@ -332,7 +332,7 @@ impl RepositoryFactory { let mut name = match index { PhpMixed::Int(_) => { if let Some(url) = repo.get("url").and_then(|v| v.as_string()) { - Preg::replace("{^https?://}i", "", url).unwrap_or_else(|_| url.to_string()) + Preg::replace("{^https?://}i", "", url) } else { index.as_string().unwrap_or("").to_string() } @@ -351,7 +351,7 @@ impl RepositoryFactory { existing_repos: &IndexMap<String, RepositoryInterfaceHandle>, ) -> String { let mut name = if let Some(url) = repo.get("url").and_then(|v| v.as_string()) { - Preg::replace("{^https?://}i", "", url).unwrap_or_else(|_| url.to_string()) + Preg::replace("{^https?://}i", "", url) } else { index.to_string() }; |
