sqlx/sqlx-core
Andrew Lilley Brinker f06c4c27ce
Implement Clone for PoolOptions manually (#2548) (#2553)
* Implement Clone for PoolOptions manually (#2548)

Trying to derive `Clone` automatically for `PoolOptions` results
in errors when `clone` is actually called. This is because the
derive incorrectly determines that `Clone` is _not_ derivable
due to the lack of `Clone` implementation on the `DB: Database`
type parameter, even though no value of that type is actually
stored in a to-be-cloned position (in fact, it's only used for
the `Connection` associated type on the type parameter's
`Database` trait impl).

Manually implementing `Clone` side-steps this issue and insures
the type is always actually cloneable.

For reference: https://github.com/launchbadge/sqlx/issues/2548

* Ran 'cargo fmt'

* Simplified Arc cloning
2023-07-09 14:34:31 -07:00
..
src Implement Clone for PoolOptions manually (#2548) (#2553) 2023-07-09 14:34:31 -07:00
Cargo.toml Bump webpki-roots to v0.24 (#2597) 2023-07-08 12:42:32 -07:00