From 53f9119edd29611bd947da1187619627b59146e6 Mon Sep 17 00:00:00 2001 From: Mroik Date: Sun, 5 Apr 2026 22:51:55 +0200 Subject: Rename stuff to disambiguate Having both the callback and the high level API be called execute() is confusing. Rename for clarity. Signed-off-by: Mroik --- src/database.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/database.rs') diff --git a/src/database.rs b/src/database.rs index 10a5843..16ed137 100644 --- a/src/database.rs +++ b/src/database.rs @@ -63,18 +63,18 @@ impl Database { pub fn execute(&mut self, q: Ex) -> Result> where - Ex: DBExecutable, + Ex: Query, { let tx = self.conn.transaction()?; - let ris = q.execute(&tx)?; + let ris = q.callback(&tx)?; tx.commit()?; Ok(ris) } } -pub trait DBExecutable { +pub trait Query { type T; - fn execute(&self, tx: &Transaction) -> Result>; + fn callback(&self, tx: &Transaction) -> Result>; } #[derive(Debug)] -- cgit v1.3