mirror of
https://github.com/modrinth/code.git
synced 2026-08-30 11:36:05 +00:00
fix: be more declarative with types
This commit is contained in:
@@ -1957,9 +1957,11 @@ where
|
||||
.await
|
||||
.wrap_internal_err("fetching projects from database")?;
|
||||
|
||||
let mut grouped_projects = HashMap::new();
|
||||
let mut grouped_projects: HashMap<ProjectStatus, Vec<ProjectId>> = HashMap::new();
|
||||
for project in &projects {
|
||||
*grouped_projects.entry(project.inner.status).or_default().push(project.inner.id.into());
|
||||
*grouped_projects.entry(project.inner.status)
|
||||
.or_default()
|
||||
.push(project.inner.id.into());
|
||||
}
|
||||
|
||||
Ok(grouped_projects)
|
||||
|
||||
Reference in New Issue
Block a user