|
We are migrating from pub fn run(conn: &mut dyn BoxableConnection<Pg>) -> MResult<()> {
let conn = conn.downcast_mut::<PooledConnection<ConnectionManager<PgConnection>>>().unwrap();I tried to downcast to Now, perhaps I could have kept the code the same but I removed |
Replies: 1 comment 3 replies
|
You need to provide the exact same connection type there that is used to run the migrations on. It's hard to say which type that is as you did not share that part of your code. |
Maybe you have a look at the relevant example? That is linked several times from previous discussions. As written before: If you want to receive a specific type from a
BoxableConnectionit needs to be exactly that type you put in before.