diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-27 03:52:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-27 04:21:34 +0900 |
| commit | 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 (patch) | |
| tree | f4d9b0abf4df9b5e363e3bd65511d70e3d5ada00 /crates/shirabe/src/repository/vcs/svn_driver.rs | |
| parent | cc07b5abb83a40d678401c335bdc49bb81b72c5f (diff) | |
| download | php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.gz php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.tar.zst php-shirabe-2b51554ff59d1e5cbf8dd2db65d278b0202a9102.zip | |
refactor: fix compiler warnings and clippy warnings
Diffstat (limited to 'crates/shirabe/src/repository/vcs/svn_driver.rs')
| -rw-r--r-- | crates/shirabe/src/repository/vcs/svn_driver.rs | 12 |
1 files changed, 5 insertions, 7 deletions
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<IndexMap<String, PhpMixed>> = - parsed.as_array().map(|m| m.clone()); + let composer: Option<IndexMap<String, PhpMixed>> = 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<String, String> = 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( |
