1
0
Fork 0
This commit is contained in:
ChaotiCryptidz 2022-08-22 21:27:27 +01:00
parent bde32f5dd7
commit c50dc62121
No known key found for this signature in database

View file

@ -40,7 +40,7 @@ pub async fn check_missing(args: CheckMissingArgs) {
let total_missing: Vec<String> = HashMap::<String, bool>::from_iter(
missing_stickers
.iter()
.map(|(_, stickers)| stickers.clone())
.map(|(_pack_name, stickers)| stickers.clone())
.collect::<Vec<Vec<String>>>()
.concat()
.iter()
@ -49,9 +49,21 @@ pub async fn check_missing(args: CheckMissingArgs) {
.into_keys()
.collect();
let missing_from_all: Vec<&String> = total_missing
.iter()
.filter(|missing_sticker| {
return missing_stickers
.iter()
.map(|(_pack_name, stickers)| stickers.contains(missing_sticker))
.any(|x| !x);
})
.collect();
for (pack_name, stickers) in missing_stickers.iter() {
println!("Pack: {}\nMissing: {:#?}\n", pack_name, stickers);
}
println!("Total Missing {:#?}", total_missing);
println!("Total Missing {:#?}\n", total_missing);
println!("Missing From All {:#?}", missing_from_all);
}