From 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Jun 2026 03:52:05 +0900 Subject: refactor: fix compiler warnings and clippy warnings --- crates/shirabe/src/repository/vcs/svn_driver.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'crates/shirabe/src/repository/vcs/svn_driver.rs') diff --git a/crates/shirabe/src/repository/vcs/svn_driver.rs b/crates/shirabe/src/repository/vcs/svn_driver.rs index dd2d26d..087ed9d 100644 --- a/crates/shirabe/src/repository/vcs/svn_driver.rs +++ b/crates/shirabe/src/repository/vcs/svn_driver.rs @@ -5,8 +5,7 @@ use chrono::{DateTime, FixedOffset, Utc}; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ - PhpMixed, RuntimeException, array_key_exists, is_array, sprintf, stripos, strrpos, strtr, - substr, trim, + PhpMixed, RuntimeException, array_key_exists, stripos, strrpos, strtr, substr, trim, }; use crate::cache::Cache; @@ -187,8 +186,7 @@ impl SvnDriver { } let parsed = JsonFile::parse_json(Some(res.as_str()), None)?; - let composer: Option> = - parsed.as_array().map(|m| m.clone()); + let composer: Option> = parsed.as_array().cloned(); self.inner .info_cache .insert(identifier.to_string(), composer.clone()); @@ -380,10 +378,10 @@ impl SvnDriver { if self.branches.is_none() { let mut branches: IndexMap = IndexMap::new(); - let trunk_parent = if self.trunk_path.is_none() { - format!("{}/", self.base_url) + let trunk_parent = if let Some(trunk_path) = self.trunk_path.as_ref() { + format!("{}/{}", self.base_url, trunk_path) } else { - format!("{}/{}", self.base_url, self.trunk_path.as_ref().unwrap()) + format!("{}/", self.base_url) }; let output = self.execute( -- cgit v1.3.1