Fix some clippy warnings

This commit is contained in:
Joscha 2021-12-13 21:16:21 +00:00
parent e912d6db1a
commit 38e7d02f61
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ impl LineLayout {
.filter(|(_, n)| **n == number) .filter(|(_, n)| **n == number)
.map(|(i, _)| *i) .map(|(i, _)| *i)
.next() .next()
.ok_or_else(|| Error::NoSuchEntry(number)) .ok_or(Error::NoSuchEntry(number))
} }
fn render_layout_entry(&mut self, files: &Files, entries: &[Entry], l_entry: &DayEntry) { fn render_layout_entry(&mut self, files: &Files, entries: &[Entry], l_entry: &DayEntry) {

View file

@ -58,7 +58,7 @@ impl DateRange {
pub fn days(&self) -> impl Iterator<Item = NaiveDate> { pub fn days(&self) -> impl Iterator<Item = NaiveDate> {
(self.from.num_days_from_ce()..=self.until.num_days_from_ce()) (self.from.num_days_from_ce()..=self.until.num_days_from_ce())
.map(|n| NaiveDate::from_num_days_from_ce(n)) .map(NaiveDate::from_num_days_from_ce)
} }
pub fn years(&self) -> RangeInclusive<i32> { pub fn years(&self) -> RangeInclusive<i32> {