Skip to content

Commit

Permalink
clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronOpfer committed Jul 3, 2024
1 parent d8371c5 commit 5c42921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand Down
4 changes: 2 additions & 2 deletions src/rawrepodata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub async fn fetch_repodata(
is_offline: bool,
) -> Result<RepodataFilenames, Box<dyn std::error::Error>> {
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<Url> = all_architectures
.map(|architecture| Url::parse(&(format!("{channel_alias}{architecture}/"))))
.collect::<Result<Vec<Url>, _>>()?;
Expand All @@ -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}");
}
}

Expand Down

0 comments on commit 5c42921

Please sign in to comment.