mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-14 11:42:18 +08:00
Remove 'static requirement on output of closure given to query_map and query_and_then.
The 'static bound was there to prevent callers from being able to save off the `SqliteRow` handles passed into the closure. This PR changes the closure to take `&SqliteRow`s instead, which provides the same feature without restricting the output of the closure.
This commit is contained in:
@@ -91,7 +91,7 @@ There are other, less obvious things that may result in a panic as well, such as
|
||||
`collect()` on a `SqliteRows` and then trying to use the collected rows.
|
||||
|
||||
Strongly consider using the method `query_map()` instead, if you can.
|
||||
`query_map()` returns an iterator over rows-mapped-to-some-`'static`-type. This
|
||||
`query_map()` returns an iterator over rows-mapped-to-some-type. This
|
||||
iterator does not have any of the above issues with panics due to attempting to
|
||||
access stale rows.
|
||||
|
||||
|
Reference in New Issue
Block a user