From c09cd630afb4bb0ca10e926f93bf706ca828ae85 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 16:07:07 +0900 Subject: refactor(clippy): resolve idiomatic lint warnings Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/downloader/vcs_downloader.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/downloader') diff --git a/crates/shirabe/src/downloader/vcs_downloader.rs b/crates/shirabe/src/downloader/vcs_downloader.rs index 993d18a..482a343 100644 --- a/crates/shirabe/src/downloader/vcs_downloader.rs +++ b/crates/shirabe/src/downloader/vcs_downloader.rs @@ -462,8 +462,8 @@ pub trait VcsDownloader: } fn prepare_urls(&self, mut urls: Vec) -> Vec { - for index in 0..urls.len() { - let mut url = urls[index].clone(); + for url_entry in &mut urls { + let mut url = url_entry.clone(); if Filesystem::is_local_path(&url) { // realpath() below will not understand // url that starts with "file://" @@ -479,10 +479,10 @@ pub trait VcsDownloader: url = rawurldecode(&url); } - urls[index] = realpath(&url).unwrap_or_default(); + *url_entry = realpath(&url).unwrap_or_default(); if is_file_protocol { - urls[index] = format!("{}{}", file_protocol, urls[index]); + *url_entry = format!("{}{}", file_protocol, url_entry); } } } -- cgit v1.3.1