diff --git a/src/main.rs b/src/main.rs index 3265f7a..9983119 100644 --- a/src/main.rs +++ b/src/main.rs @@ -224,7 +224,7 @@ impl Database { async fn services(&self) -> rusqlite::Result> { let db = self.0.lock().await; - let mut stmt = db.prepare("SELECT * FROM services")?; + let mut stmt = db.prepare("SELECT id, name FROM services")?; let res = stmt.query_map( params![], |row| Ok((row.get(0)?, row.get(1)?)) @@ -282,7 +282,7 @@ impl Database { let mut stmt = db.prepare("SELECT value FROM events WHERE service = :sid AND time > :time")?; stmt.query_row( named_params! { ":sid": sid, ":time": since }, - |row| row.get(0).optional() + |row| row.get::>(0) ) } }