mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 16:36:59 +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,
|
sql: &str,
|
||||||
params: impl rusqlite::Params + Send,
|
params: impl rusqlite::Params + Send,
|
||||||
f: F,
|
f: F,
|
||||||
mut g: G,
|
g: G,
|
||||||
) -> Result<H>
|
) -> Result<H>
|
||||||
where
|
where
|
||||||
F: Send + FnMut(&rusqlite::Row) -> rusqlite::Result<T>,
|
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,
|
H: Send + 'static,
|
||||||
{
|
{
|
||||||
let query_only = true;
|
let query_only = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user