diff --git a/postgres/src/connection.rs b/postgres/src/connection.rs index bc8564f5..453eef3a 100644 --- a/postgres/src/connection.rs +++ b/postgres/src/connection.rs @@ -16,14 +16,14 @@ pub struct Connection { runtime: Runtime, connection: Pin> + Send>>, notifications: VecDeque, - notice_callback: Arc, + notice_callback: Arc, } impl Connection { pub fn new( runtime: Runtime, connection: tokio_postgres::Connection, - notice_callback: Arc, + notice_callback: Arc, ) -> Connection where S: AsyncRead + AsyncWrite + Unpin + 'static + Send, diff --git a/postgres/src/test.rs b/postgres/src/test.rs index dcf202ef..0fd40457 100644 --- a/postgres/src/test.rs +++ b/postgres/src/test.rs @@ -499,3 +499,12 @@ fn explicit_close() { let client = Client::connect("host=localhost port=5433 user=postgres", NoTls).unwrap(); client.close().unwrap(); } + +#[test] +fn check_send() { + fn is_send() {} + + is_send::(); + is_send::(); + is_send::>(); +}