summaryrefslogtreecommitdiff
path: root/2020/rust/aoc/src/lib.rs
blob: bd0c31e5fcf88f2086e0991b502d8c3f66c5be94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::env;

pub fn do_parts() -> (bool, bool) {
    match env::var("AOC_PARTS") {
        Ok(parts) => {
            let do_part_1 = parts.contains('1');
            let do_part_2 = parts.contains('2');

            (do_part_1, do_part_2)
        },
        Err(_) => (true, true)
    }
}