Skip to content

Commit 45a1d81

Browse files
committed
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.
1 parent 19d7799 commit 45a1d81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sql.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ impl Sql {
370370
sql: &str,
371371
params: impl rusqlite::Params + Send,
372372
f: F,
373-
mut g: G,
373+
g: G,
374374
) -> Result<H>
375375
where
376376
F: Send + FnMut(&rusqlite::Row) -> rusqlite::Result<T>,
377-
G: Send + FnMut(rusqlite::MappedRows<F>) -> Result<H>,
377+
G: Send + FnOnce(rusqlite::MappedRows<F>) -> Result<H>,
378378
H: Send + 'static,
379379
{
380380
let query_only = true;

0 commit comments

Comments
 (0)