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:
John Gallagher
2015-12-01 10:55:01 -05:00
parent 86165725de
commit 635616842c
3 changed files with 15 additions and 13 deletions

View File

@@ -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.