From db914abd009ccf7771f354550c6582873ca761ba Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Wed, 28 Jul 2021 13:34:00 -0400 Subject: [PATCH] Make the empty placeholder params be Send + Sync --- src/params.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/params.rs b/src/params.rs index 88fce97..b817ced 100644 --- a/src/params.rs +++ b/src/params.rs @@ -169,8 +169,8 @@ pub trait Params: Sealed { // Explicitly impl for empty array. Critically, for `conn.execute([])` to be // unambiguous, this must be the *only* implementation for an empty array. This // avoids `NO_PARAMS` being a necessary part of the API. -impl Sealed for [&dyn ToSql; 0] {} -impl Params for [&dyn ToSql; 0] { +impl Sealed for [&(dyn ToSql + Send + Sync); 0] {} +impl Params for [&(dyn ToSql + Send + Sync); 0] { #[inline] fn __bind_in(self, stmt: &mut Statement<'_>) -> Result<()> { // Note: Can't just return `Ok(())` — `Statement::bind_parameters`