mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user