Thank you for an excellent and very useful utility!
I have been using ktra with the default db-sled but once every few months I get errors associated with data corruption.
So, the logical step is to use another db engine with ktra that supports data integrity.
I tried to install ktra with "--no-default-features --features=secure-auth,db-mongo" and "--no-default-features --features=secure-auth,db-redis" and in both cases I get the following compilation error:
Compiling ktra v0.7.0
error[E0382]: borrow of moved value: `db_manager`
--> /home/user/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/ktra-0.7.0/src/main.rs:86:39
|
77 | db_manager: Arc<RwLock<impl DbManager>>,
| ---------- move occurs because `db_manager` has type `Arc<tokio::sync::RwLock<impl DbManager>>`, which does not implement the `Copy` trait
...
84 | .or(put::apis(db_manager, index_manager, dl_dir_path));
| ---------- value moved here
85 | #[cfg(not(feature = "openid"))]
86 | let routes = routes.or(post::apis(db_manager.clone()));
| ^^^^^^^^^^^^^^^^^^ value borrowed here after move
For more information about this error, try `rustc --explain E0382`.
error: could not compile `ktra` due to previous error
I traced the source code and It looks like an easy fix. I will submit a pull request with it.
Thank you for all your hard work!