diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
| commit | a1c7e6908a26e10f6e1f23a51721664b5e2d838d (patch) | |
| tree | c575c76f1b43359ed74913da4c6a2636643f1ba0 /crates/shirabe/src/util/svn.rs | |
| parent | 7f606f36fef0c0467c3c0db3d0da33af486dae8a (diff) | |
| download | php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.gz php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.zst php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.zip | |
chore(style): cargo fmt
Diffstat (limited to 'crates/shirabe/src/util/svn.rs')
| -rw-r--r-- | crates/shirabe/src/util/svn.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/crates/shirabe/src/util/svn.rs b/crates/shirabe/src/util/svn.rs index 2277c68..f1a900c 100644 --- a/crates/shirabe/src/util/svn.rs +++ b/crates/shirabe/src/util/svn.rs @@ -6,8 +6,8 @@ use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::preg::Preg; use shirabe_php_shim::{ - empty, implode, parse_url, parse_url_all, stripos, strpos, trim, LogicException, PhpMixed, - RuntimeException, PHP_URL_HOST, + LogicException, PHP_URL_HOST, PhpMixed, RuntimeException, empty, implode, parse_url, + parse_url_all, stripos, strpos, trim, }; use crate::config::Config; @@ -148,17 +148,16 @@ impl Svn { }; // TODO(phase-b): pass handler callback to process.execute let mut handler_output = String::new(); - let status = self.process.execute(&command, &mut handler_output, cwd.map(String::from)); + let status = self + .process + .execute(&command, &mut handler_output, cwd.map(String::from)); if 0 == status { return Ok(output); } let error_output = self.process.get_error_output(); let full_output = trim( - &implode( - "\n", - &[output.clone().unwrap_or_default(), error_output], - ), + &implode("\n", &[output.clone().unwrap_or_default(), error_output]), None, ); @@ -425,10 +424,9 @@ impl Svn { None, ) { // TODO(phase-b): Preg::is_match with captures should populate $match - if let Ok(Some(matches)) = Preg::is_match_with_indexed_captures( - r"{(\d+(?:\.\d+)+)}", - &output, - ) { + if let Ok(Some(matches)) = + Preg::is_match_with_indexed_captures(r"{(\d+(?:\.\d+)+)}", &output) + { *cached = Some(matches.get(1).cloned().unwrap_or_default()); } } @@ -437,4 +435,3 @@ impl Svn { cached.clone() } } - |
