Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iterator: fix QueryPager::rows_stream() lifetime constraints
It appears that the previous requirements: ```rust fn rows_stream< 'frame, 'metadata, RowT: 'static + DeserializeRow<'frame, 'metadata> > ``` allowed creating the `TypedRowStream<&'static str>`. It was error-prone, because the compiler would accept `rows_stream::<&str>`, happily deducing that it's `&'static str`, and failing upon Stream `next()` not being a lending method. To prevent such situations, the constraints are changed the following way (credits to @Lorak-mmk): ```rust fn rows_stream< RowT: 'static + for<'frame, 'metadata> DeserializeRow<'frame, 'metadata> > ``` and now `&'static str` is not permitted (because it only implements `DeserializeValue<'static, '_>`. Co-authored-by: Karol Baryła <[email protected]>
- Loading branch information