mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 04:42:15 +00:00
I didn't know about into_iter before :/
This commit is contained in:
@@ -77,9 +77,9 @@ impl CalendarStore for SqliteCalendarStore {
|
|||||||
let events = sqlx::query_as!(EventRow, "SELECT uid, ics FROM events WHERE cid = ?", cid)
|
let events = sqlx::query_as!(EventRow, "SELECT uid, ics FROM events WHERE cid = ?", cid)
|
||||||
.fetch_all(&self.db)
|
.fetch_all(&self.db)
|
||||||
.await?
|
.await?
|
||||||
.iter_mut()
|
.into_iter()
|
||||||
// TODO: this is an ugly bodge :(
|
// TODO: this is an ugly bodge :(
|
||||||
.filter_map(|row| row.clone().try_into().ok())
|
.filter_map(|row| row.try_into().ok())
|
||||||
.collect();
|
.collect();
|
||||||
Ok(events)
|
Ok(events)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user