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

Cant build when tls/openssl are enabled #91

Open
Firaenix opened this issue Jan 22, 2025 · 0 comments
Open

Cant build when tls/openssl are enabled #91

Firaenix opened this issue Jan 22, 2025 · 0 comments

Comments

@Firaenix
Copy link

Hi, I've got a fairly simple cron process that I finally want to connect to a postgres DB to store job metadata, however I'm unable to build my project when I enable the TLS or OpenSSL features. It builds fine with just "postgres_storage" but my DB requires an SSL connection.

Cargo.toml

tokio-cron-scheduler = { version = "0.13.0", features = [
  "signal",
  "log",
  "tracing-subscriber",
  "postgres_storage",
  "postgres_native_tls",
] }

Error:

error[E0423]: expected value, found struct `postgres_native_tls::TlsConnector`
  --> /Users/firaenix/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-cron-scheduler-0.13.0/src/postgres/mod.rs:81:31
   |
81 |                     let tls = postgres_native_tls::TlsConnector;
   |                               ^^^^^^^^^^^^^^^^^^^^^------------
   |                                                    |
   |                                                    help: a tuple struct with a similar name exists: `MakeTlsConnector`
   |
  ::: /Users/firaenix/.cargo/registry/src/index.crates.io-6f17d22bba15001f/postgres-native-tls-0.5.0/src/lib.rs:68:1
   |
68 | pub struct MakeTlsConnector(native_tls::TlsConnector);
   | --------------------------- similarly named tuple struct `MakeTlsConnector` defined here
...
93 | pub struct TlsConnector {
   | ----------------------- `postgres_native_tls::TlsConnector` defined here

For more information about this error, try `rustc --explain E0423`.
error: could not compile `tokio-cron-scheduler` (lib) due to 1 previous error
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