Function advent_of_code_2021::day_22::merge_instruction[−][src]

fn merge_instruction(
    instruction: Instruction,
    cuboids: &Vec<Cuboid>
) -> Vec<Cuboid>ⓘ
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator, 
Expand description

Merge an instruction into the current list of cuboids. Use Cuboid::diff_and_split to remove the instruction’s cuboid from other cuboids it overlaps. Then if it is itself on, add the new cuboid to the list to mark that its entire region is now active.