Migrate to Diesel 2.0
The bulk work is done, but the following would have to be double checked:
- Database migrations are run inside a transaction - that can't roll back changes in tables, right?
- Is
Error::RollbackTransaction
used correctly? - Using multiple
batch_execute()
calls in a row feels dumb, but results in better error messages...
But: it doesn't compile:
error[E0596]: cannot borrow data in a dereference of `ReentrantMutexGuard<'_, parking_lot::RawMutex, RawThreadId, diesel::SqliteConnection>` as mutable
--> whisperfish/src/store/protocol_store.rs:68:43
|
68 | prekeys.select(max(id)).first(&mut *db).expect("db")
| ^^^^^^^^ cannot borrow as mutable
|
And 9 other similar errors. I have literally no idea what causes that. The same error comes with up-to-date cargo clippy
run, and trying to compile inside sfdk
.
Fixes #227 (closed)
Edited by Ruben De Smet