Skip to content

0.18: Client is no longer Send, therefor incompatible with r2d2 #677

@njaard

Description

@njaard
   |
8  |   type Connection = postgres::Client;
   |                     ^^^^^^^^^^^^^^^^ `(dyn std::ops::Fn(postgres::error::DbError) + 'static)` cannot be sent between threads safely
   | 
  ::: /home/charles/.cargo/registry/src/github.com-1ecc6299db9ec823/r2d2-0.8.9/src/lib.rs:72:22
   |
72 |     type Connection: Send + 'static;
   |                      ---- required by this bound in `r2d2::ManageConnection`
   |
   = help: the trait `std::marker::Send` is not implemented for `(dyn std::ops::Fn(postgres::error::DbError) + 'static)`
   = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<(dyn std::ops::Fn(postgres::error::DbError) + 'static)>`
   = note: required because it appears within the type `postgres::connection::Connection`
   = note: required because it appears within the type `postgres::Client`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions