I didn't know about into_iter before :/

This commit is contained in:
Lennart
2024-05-25 22:23:19 +02:00
parent 5bbd3ea638
commit 7e02a7e095

View File

@@ -77,9 +77,9 @@ impl CalendarStore for SqliteCalendarStore {
let events = sqlx::query_as!(EventRow, "SELECT uid, ics FROM events WHERE cid = ?", cid)
.fetch_all(&self.db)
.await?
.iter_mut()
.into_iter()
// TODO: this is an ugly bodge :(
.filter_map(|row| row.clone().try_into().ok())
.filter_map(|row| row.try_into().ok())
.collect();
Ok(events)
}