Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ktra 0.7.0 - Failed to build with "--no-default-features --features=secure-auth,db-mongo" and "--no-default-features --features=secure-auth,db-redis" #60

Open
klispap opened this issue Feb 1, 2023 · 0 comments

Comments

@klispap
Copy link

klispap commented Feb 1, 2023

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.com-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!

klispap pushed a commit to klispap/ktra that referenced this issue Feb 1, 2023
…eatures --features=secure-auth,db-mongo" and "--no-default-features --features=secure-auth,db-redis"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant