From 45a1d818059de1086eed1d2e3b32dba40ad6fcbb Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 24 Oct 2025 00:52:55 +0000 Subject: [PATCH] refactor(sql): change second query_map function from FnMut to FnOnce FnOnce is a supertrait of FnMut, so any argument that implements FnMut can also be used in a place where FnOnce is required. --- src/sql.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql.rs b/src/sql.rs index 1a9ed5c87..73c43ab83 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -370,11 +370,11 @@ impl Sql { sql: &str, params: impl rusqlite::Params + Send, f: F, - mut g: G, + g: G, ) -> Result where F: Send + FnMut(&rusqlite::Row) -> rusqlite::Result, - G: Send + FnMut(rusqlite::MappedRows) -> Result, + G: Send + FnOnce(rusqlite::MappedRows) -> Result, H: Send + 'static, { let query_only = true;