From 5c42921d85cfa95a3bba5dff548dd7adfc52e6a4 Mon Sep 17 00:00:00 2001 From: Aaron Opfer Date: Wed, 3 Jul 2024 18:43:20 -0500 Subject: [PATCH] clippy suggestions --- src/main.rs | 2 +- src/rawrepodata.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index afb9213..91f0354 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,7 +91,7 @@ async fn main() { } if args.architectures.is_empty() { args.architectures - .extend(ARCHITECTURES.iter().map(|arch| arch.to_string())); + .extend(ARCHITECTURES.iter().map(|arch| (*arch).to_string())); } else { // TODO: Validate architectures are sane. } diff --git a/src/rawrepodata.rs b/src/rawrepodata.rs index 6ff078b..78e8f37 100644 --- a/src/rawrepodata.rs +++ b/src/rawrepodata.rs @@ -19,7 +19,7 @@ pub async fn fetch_repodata( is_offline: bool, ) -> Result> { let cache = &default_cache_dir()?; - let all_architectures = architectures.iter().map(|a| a.as_str()).chain(["noarch"]); + let all_architectures = architectures.iter().map(String::as_str).chain(["noarch"]); let repodata_urls: Vec = all_architectures .map(|architecture| Url::parse(&(format!("{channel_alias}{architecture}/")))) .collect::, _>>()?; @@ -41,7 +41,7 @@ pub async fn fetch_repodata( match &result.cache_result { CacheResult::CacheHit | CacheResult::CacheHitAfterFetch => {} CacheResult::CacheOutdated | CacheResult::CacheNotPresent => { - println!("fetched {repodata_url}") + println!("fetched {repodata_url}"); } }