Fix overlaps_with_range

This commit is contained in:
pjht 2022-12-04 12:07:29 -06:00
parent 1d8471ec06
commit 66de5e1f5e

View File

@ -23,7 +23,7 @@ fn contains_range(slf: &RangeInclusive<u64>, other: &RangeInclusive<u64>) -> boo
} }
fn overlaps_with_range(slf: &RangeInclusive<u64>, other: &RangeInclusive<u64>) -> bool { fn overlaps_with_range(slf: &RangeInclusive<u64>, other: &RangeInclusive<u64>) -> bool {
slf.contains(other.start()) slf.contains(other.start()) || slf.contains(other.end())
} }
#[aoc(day4, part1)] #[aoc(day4, part1)]