aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/db')
-rw-r--r--src/db/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/mod.rs b/src/db/mod.rs
index 3348673..6cfa2eb 100644
--- a/src/db/mod.rs
+++ b/src/db/mod.rs
@@ -23,14 +23,14 @@ pub fn insert(conn: &Connection, event: &Event) -> Result<()> {
pub fn list(conn: &Connection) -> Result<Vec<Event>> {
let mut stmt = conn.prepare("SELECT date, start, end, name FROM events")?;
- let iter = stmt.query_map([], |row|
+ let iter = stmt.query_map([], |row| {
Ok(Event {
date: row.get(0)?,
start: row.get(1)?,
end: row.get(2)?,
name: row.get(3)?,
})
- )?;
+ })?;
Ok(iter.map(|r| r.unwrap()).collect())
}