From f65eadbc83835ae20447cd406bf2d3f333007559 Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Mon, 11 May 2015 16:44:32 -0400 Subject: [PATCH] Update README's recommendation of query_map --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8121a67..990af8d 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,10 @@ fn bad_function_will_panic(conn: &SqliteConnection) -> SqliteResult { There are other, less obvious things that may result in a panic as well, such as calling `collect()` on a `SqliteRows` and then trying to use the collected rows. -The method `query_map()` is an alternative to `query()` and is guaranteed not to panic. This method -returns an iterator over rows after they have been mapped to a static type, e.g., types without -references to other values. +Strongly consider using the method `query_map()` instead, if you can. +`query_map()` returns an iterator over rows-mapped-to-some-`'static`-type. This +iterator does not have any of the above issues with panics due to attempting to +access stale rows. ## Author