From 66de5e1f5e3c529e59605e6957543fb956c8767f Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 4 Dec 2022 12:07:29 -0600 Subject: [PATCH] Fix overlaps_with_range --- src/day04.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/day04.rs b/src/day04.rs index 4f66845..5b069ce 100644 --- a/src/day04.rs +++ b/src/day04.rs @@ -23,7 +23,7 @@ fn contains_range(slf: &RangeInclusive, other: &RangeInclusive) -> boo } fn overlaps_with_range(slf: &RangeInclusive, other: &RangeInclusive) -> bool { - slf.contains(other.start()) + slf.contains(other.start()) || slf.contains(other.end()) } #[aoc(day4, part1)]