m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-14 08:03:48 -05:00

refactor: replace unwrap_or with unwrap_or_default

This commit is contained in:
Sergio
2025-05-28 18:58:29 +03:00
parent adbd999c14
commit 4fe070a5a0

View File

@@ -138,7 +138,7 @@ pub async fn get_in_use_images(ctx: &Context) -> FxHashMap<String, Vec<String>>
.map(|name| name.trim_start_matches('/').to_owned()) .map(|name| name.trim_start_matches('/').to_owned())
.collect() .collect()
}) })
.unwrap_or(Vec::new()); .unwrap_or_default();
match result.get_mut(&reference) { match result.get_mut(&reference) {
Some(containers) => containers.append(&mut names), Some(containers) => containers.append(&mut names),