From 00e916dc7c47f1daa2e81c4c0f50c00fa44f83d7 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 4 Oct 2024 19:23:00 +0300 Subject: [PATCH] disable field not in use --- src/app/database.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app/database.rs b/src/app/database.rs index e96c42d7..462a03ef 100644 --- a/src/app/database.rs +++ b/src/app/database.rs @@ -3,7 +3,7 @@ use std::sync::Arc; pub struct Table { pub id: i64, - pub time: i64, + // pub time: i64, } pub struct Database { @@ -30,14 +30,9 @@ impl Database { } pub fn records(&self) -> Result, Error> { - let mut statement = self.connection.prepare("SELECT `id`, `time` FROM `app`")?; - - let result = statement.query_map([], |row| { - Ok(Table { - id: row.get(0)?, - time: row.get(1)?, - }) - })?; + let mut statement = self.connection.prepare("SELECT `id` FROM `app`")?; + + let result = statement.query_map([], |row| Ok(Table { id: row.get(0)? }))?; let mut records = Vec::new();