fix: mark blocking invocations of flush! as @blocking

This commit is contained in:
Ryan Leckey 2021-04-09 16:10:42 -07:00
parent ce44599db5
commit 7395543e22
4 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ impl<Rt: Runtime> PgConnection<Rt> {
Rt: sqlx_core::blocking::Runtime,
E: Execute<'q, 'a, Postgres>,
{
flush!(self);
flush!(@blocking self);
impl_execute!(@blocking self, query)
}
}

View File

@ -83,7 +83,7 @@ impl<Rt: Runtime> PgConnection<Rt> {
Rt: sqlx_core::blocking::Runtime,
E: Execute<'q, 'a, Postgres>,
{
flush!(self);
flush!(@blocking self);
impl_fetch_all!(@blocking self, query)
}
}

View File

@ -91,7 +91,7 @@ impl<Rt: Runtime> PgConnection<Rt> {
Rt: sqlx_core::blocking::Runtime,
E: Execute<'q, 'a, Postgres>,
{
flush!(self);
flush!(@blocking self);
impl_fetch_optional!(@blocking self, query)
}
}

View File

@ -26,7 +26,7 @@ mod tests {
let mut buf = Vec::new();
Terminate.serialize(&mut buf)?;
assert_eq!(&buf, &[b'X']);
assert_eq!(&buf, &[b'X', 0, 0, 0, 4]);
Ok(())
}