day08 part 1

This commit is contained in:
Johannes Schaefer
2018-12-09 21:17:29 +01:00
parent 4946263a37
commit 51418b709e
5 changed files with 52 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ pub fn task1() {
result.push(next);
let newly_open: HashSet<char> = depends_on
.iter()
.filter(|(task, deps)| deps.iter().all(|dep| result.chars().any(|c| c == *dep)))
.filter(|(_task, deps)| deps.iter().all(|dep| result.chars().any(|c| c == *dep)))
.map(|(task, _)| *task)
.collect();
open = open.union(&newly_open).map(|c| *c).collect();