aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/svn_downloader.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-20 01:16:50 +0900
committernsfisis <nsfisis@gmail.com>2026-06-20 02:22:41 +0900
commitefec43b3b8827820cf35fe1b73d8e33f5fe84eb4 (patch)
treea62bbba72324de48be5f8e689559f8d9e288fc61 /crates/shirabe/src/downloader/svn_downloader.rs
parentcac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 (diff)
downloadphp-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.tar.gz
php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.tar.zst
php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.zip
refactor: auto-fix clippy warnings
Diffstat (limited to 'crates/shirabe/src/downloader/svn_downloader.rs')
-rw-r--r--crates/shirabe/src/downloader/svn_downloader.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/crates/shirabe/src/downloader/svn_downloader.rs b/crates/shirabe/src/downloader/svn_downloader.rs
index 03fd292..6aed27a 100644
--- a/crates/shirabe/src/downloader/svn_downloader.rs
+++ b/crates/shirabe/src/downloader/svn_downloader.rs
@@ -67,7 +67,7 @@ impl SvnDownloader {
pub(crate) async fn discard_changes(&self, path: &str) -> anyhow::Result<Option<PhpMixed>> {
let mut output = String::new();
if self.inner.process.borrow_mut().execute_args(
- &["svn", "revert", "-R", "."].map(|s| s.to_string()).to_vec(),
+ ["svn", "revert", "-R", "."].map(|s| s.to_string()).as_ref(),
&mut output,
Some(path.to_string()),
) != 0
@@ -169,13 +169,12 @@ impl VcsDownloader for SvnDownloader {
let repo_ref = repo.borrow();
if let Some(vcs_repo) = repo_ref.as_any().downcast_ref::<VcsRepository>() {
let repo_config = vcs_repo.get_repo_config();
- if repo_config.contains_key("svn-cache-credentials") {
- if let Some(val) = repo_config
+ if repo_config.contains_key("svn-cache-credentials")
+ && let Some(val) = repo_config
.get("svn-cache-credentials")
.and_then(|v| v.as_bool())
- {
- self.cache_credentials = val;
- }
+ {
+ self.cache_credentials = val;
}
}
}
@@ -412,8 +411,8 @@ impl VcsDownloader for SvnDownloader {
};
// strip paths from references and only keep the actual revision
- let from_revision = Preg::replace(r"{.*@(\d+)$}", "$1", &from_reference);
- let to_revision = Preg::replace(r"{.*@(\d+)$}", "$1", &to_reference);
+ let from_revision = Preg::replace(r"{.*@(\d+)$}", "$1", from_reference);
+ let to_revision = Preg::replace(r"{.*@(\d+)$}", "$1", to_reference);
let command = vec![
"svn".to_string(),
@@ -463,9 +462,9 @@ impl ChangeReportInterface for SvnDownloader {
let mut output = String::new();
self.inner.process.borrow_mut().execute_args(
- &["svn", "status", "--ignore-externals"]
+ ["svn", "status", "--ignore-externals"]
.map(|s| s.to_string())
- .to_vec(),
+ .as_ref(),
&mut output,
Some(path.to_string()),
);