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.
This commit is contained in:
link2xt
2025-10-24 00:52:55 +00:00
committed by l
parent 19d7799324
commit 45a1d81805

View File

@@ -370,11 +370,11 @@ impl Sql {
sql: &str,
params: impl rusqlite::Params + Send,
f: F,
mut g: G,
g: G,
) -> Result<H>
where
F: Send + FnMut(&rusqlite::Row) -> rusqlite::Result<T>,
G: Send + FnMut(rusqlite::MappedRows<F>) -> Result<H>,
G: Send + FnOnce(rusqlite::MappedRows<F>) -> Result<H>,
H: Send + 'static,
{
let query_only = true;