m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-17 01:23:39 -05:00

Remove used async keyword from 2 functions in Image

This commit is contained in:
Sergio
2024-12-05 20:23:07 +02:00
parent 215e88ae0f
commit 6a77b85141
3 changed files with 12 additions and 23 deletions

View File

@@ -24,13 +24,12 @@ pub async fn get_updates(references: &Option<Vec<String>>, config: &Config) -> V
.iter()
.filter(|&reference| !image_refs.contains(reference))
.collect::<Vec<&String>>();
let mut handles = Vec::with_capacity(extra.len());
for reference in extra {
let future = Image::from_reference(reference);
handles.push(future)
}
Some(join_all(handles).await)
Some(
extra
.iter()
.map(|reference| Image::from_reference(reference))
.collect::<Vec<Image>>(),
)
}
None => None,
};