Skip to content

Commit

Permalink
fix/nanocld: ssl connection
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s committed Nov 6, 2023
1 parent 9a9686a commit 804d8a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/nanocld/src/utils/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub async fn create_pool(
daemon_conf: &DaemonConfig,
) -> IoResult<Pool> {
let state_dir = daemon_conf.state_dir.clone();

Check warning on line 33 in bin/nanocld/src/utils/store.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `state_dir`

warning: unused variable: `state_dir` --> bin/nanocld/src/utils/store.rs:33:7 | 33 | let state_dir = daemon_conf.state_dir.clone(); | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_state_dir` | = note: `#[warn(unused_variables)]` on by default
let options = format!("/defaultdb?sslmode=verify-full&sslcert={state_dir}/store/certs/client.root.crt&sslkey={state_dir}/store/certs/client.root.key&sslrootcert={state_dir}/store/certs/ca.crt");
let options = format!("/defaultdb");

Check warning on line 34 in bin/nanocld/src/utils/store.rs

View workflow job for this annotation

GitHub Actions / clippy

useless use of `format!`

warning: useless use of `format!` --> bin/nanocld/src/utils/store.rs:34:17 | 34 | let options = format!("/defaultdb"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"/defaultdb".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
let db_url = format!("postgresql://root:root@{host}{options}");
web::block(move || {
let manager = ConnectionManager::<PgConnection>::new(db_url);
Expand Down

0 comments on commit 804d8a5

Please sign in to comment.