From c83248741b6d5232d4f811e73eef450c9f2b8ef9 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 14 Nov 2024 14:17:43 +0200 Subject: [PATCH] add todo comments --- src/profile/bookmark/database.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/profile/bookmark/database.rs b/src/profile/bookmark/database.rs index a361420c..33924a3f 100644 --- a/src/profile/bookmark/database.rs +++ b/src/profile/bookmark/database.rs @@ -29,7 +29,7 @@ impl Database { /// Get bookmark records from database with optional filter by `request` pub fn records(&self, request: Option<&str>) -> Result, Error> { - let readable = self.connection.read().unwrap(); + let readable = self.connection.read().unwrap(); // @TODO let tx = readable.unchecked_transaction()?; select(&tx, *self.profile_id, request) } @@ -40,7 +40,7 @@ impl Database { /// * return last insert ID on success pub fn add(&self, time: DateTime, request: String) -> Result { // Begin new transaction - let mut writable = self.connection.write().unwrap(); + let mut writable = self.connection.write().unwrap(); // @TODO let tx = writable.transaction()?; // Create new record @@ -59,8 +59,8 @@ impl Database { /// Delete bookmark record from database pub fn delete(&self, id: i64) -> Result<(), Error> { // Begin new transaction - let mut writable = self.connection.write().unwrap(); - let tx = writable.transaction().unwrap(); + let mut writable = self.connection.write().unwrap(); // @TODO + let tx = writable.transaction()?; // Delete record by ID match delete(&tx, id) {