Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-implement ConnectionLike for Deref + DerefMut
This provides an implementation of `ConnectionLike` for any type that can be mutably and immutably dereferenced to an implementation of `ConnectionLike` through `Deref` and `DerefMut`. The primary motivation is being able to use `r2d2::PoolConnection`s directly to satisfy `ConnectionLike`, which makes code using pooled connections easier to read. A blanket impl for `r2d2::PoolConnection` would suffice but this is more generalised as not to be r2d2 specific.
- Loading branch information