Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BasiqueEvangelist committed Oct 3, 2023
1 parent b6f975b commit c686bf1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/routes/updates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ pub async fn atom_feed(
}
}

fn tag_to_category(tag: &String) -> Category {
fn tag_to_category(tag: &str) -> Category {
Category {
term: tag.clone(),
term: tag.to_string(),
scheme: None,
label: Some(tag.clone()),
label: Some(tag.to_string()),
}
}

Expand All @@ -224,6 +224,7 @@ pub async fn atom_feed(
.categories
.iter()
.chain(project.additional_categories.iter())
.map(|x| x.as_str())
.map(tag_to_category)
.collect::<Vec<_>>(),
contributors: members_data
Expand Down Expand Up @@ -265,13 +266,12 @@ pub async fn atom_feed(
entries: versions
.iter()
.map(|v| {
let version_id = crate::models::ids::VersionId::from(v.id);
let link = format!(
"{}/{}/{}/version/{}",
dotenvy::var("SITE_URL").unwrap_or_default(),
project.project_type,
project_id,
version_id
v.id
);

Entry {
Expand All @@ -287,8 +287,8 @@ pub async fn atom_feed(
categories: v
.loaders
.iter()
.map(|x| &x.0)
.chain(v.game_versions.iter().map(|x| &x.0))
.map(|x| x.0.as_str())
.chain(v.game_versions.iter().map(|x| x.0.as_str()))
.map(tag_to_category)
.collect::<Vec<_>>(),
contributors: vec![],
Expand Down

0 comments on commit c686bf1

Please sign in to comment.