Remove unnecessary boxfutures
This is a breaking change
This pr removes unnecessary BoxFuture's in trait definitions Connection, MigrateDatabase, TransactionManager, ConnectOptions, TestSupport and PgPoolCopyExt.
I was not able to make these changes to the Executor and Acquire traits unfortunately because of a rustc limitation.
error: lifetime bound not satisfied
|
38 | / async fn fetch_optional<'e, 'q: 'e, E>(
39 | | self,
40 | | query: E,
41 | | ) -> Result<Option<DB::Row>, Error>
42 | | where
43 | | E: 'q + Execute<'q, Self::Database>,
| |____________________________________________^
|
= note: this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information)
It seems like the stack is overflowing in debug mode, in release mode the tests pass.
We probably need to do the same thing to PgConnection as was done to MySqlConnection and wrap the fields in a Box, then it'll be less to pass around.
The Executor and Acquire traits likely require reworking anyway. I'll get to that at some point soon.
We probably need to do the same thing to
PgConnectionas was done toMySqlConnectionand wrap the fields in aBox, then it'll be less to pass around.
I opened a new pr for this (#3529)