iron / persistent

Middleware for sharing data between requests
43 stars 29 forks source link

PersistentInto for T is Failing with mysql::Pool #63

Closed TheServerAsterisk closed 7 years ago

TheServerAsterisk commented 7 years ago

I get the following output when trying to persist the mysql::Pool struct.

error[E0277]: the trait bound `mysql::conn::pool::Pool: persistent::PersistentInto<std::sync::Arc<mysql::Pool>>` is not satisfied
  --> src/bin/bin.rs:70:23
   |
70 |     chain.link_before(Read::<DBKey>::one(pool));
   |                       ^^^^^^^^^^^^^^^^^^ trait `mysql::conn::pool::Pool: persistent::PersistentInto<std::sync::Arc<mysql::Pool>>` not satisfied
   |
   = note: required by `<persistent::Read<P>>::one`

I thought it might be due a mismatched dependency so I forked the and set the iron dependency to 0.5.1 (which is what I am using), but this didn't work as well. Any ideas on how to resolve this?

untitaker commented 7 years ago

You're using the wrong version of Iron together with persistent. If you use persistent 0.3, you need Iron 0.5. If you use persistent 0.2, you need Iron 0.4