mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
Make Send a supertrait of TryMapRow, MapRow
Map<'q, DB, F, A> where F: !Send was useless and these traits are only used as part of Map. This might improve error messages.
This commit is contained in:
parent
a46d7f8fdf
commit
4ad4a42edd
@ -356,13 +356,13 @@ where
|
||||
//
|
||||
// See https://github.com/rust-lang/rust/issues/62529
|
||||
|
||||
pub trait TryMapRow<DB: Database> {
|
||||
pub trait TryMapRow<DB: Database>: Send {
|
||||
type Output: Unpin;
|
||||
|
||||
fn try_map_row(&mut self, row: DB::Row) -> Result<Self::Output, Error>;
|
||||
}
|
||||
|
||||
pub trait MapRow<DB: Database> {
|
||||
pub trait MapRow<DB: Database>: Send {
|
||||
type Output: Unpin;
|
||||
|
||||
fn map_row(&mut self, row: DB::Row) -> Self::Output;
|
||||
@ -449,7 +449,7 @@ macro_rules! impl_map_row {
|
||||
($DB:ident, $R:ident) => {
|
||||
impl<O: Unpin, F> crate::query::MapRow<$DB> for F
|
||||
where
|
||||
F: FnMut($R) -> O,
|
||||
F: Send + FnMut($R) -> O,
|
||||
{
|
||||
type Output = O;
|
||||
|
||||
@ -460,7 +460,7 @@ macro_rules! impl_map_row {
|
||||
|
||||
impl<O: Unpin, F> crate::query::TryMapRow<$DB> for F
|
||||
where
|
||||
F: FnMut($R) -> Result<O, crate::error::Error>,
|
||||
F: Send + FnMut($R) -> Result<O, crate::error::Error>,
|
||||
{
|
||||
type Output = O;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user