Fix overlaps_with_range
This commit is contained in:
parent
1d8471ec06
commit
66de5e1f5e
@ -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)]
|
||||||
|
Loading…
Reference in New Issue
Block a user