Skip to content

Commit 3eb7f62

Browse files
Luuk Westerweiznich
authored andcommitted
more closely resemble diesel's example structure
1 parent 92e1506 commit 3eb7f62

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/pooled-pg-with-rustls/Cargo.toml renamed to examples/postgres/pooled-with-rustls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "pooled-pg-with-rustls"
2+
name = "pooled-with-rustls"
33
version = "0.1.0"
44
edition = "2021"
55

examples/pooled-pg-with-rustls/src/main.rs renamed to examples/postgres/pooled-with-rustls/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
3434

3535
fn establish_connection(config: &str) -> BoxFuture<ConnectionResult<AsyncPgConnection>> {
3636
let fut = async {
37+
// We first set up the way we want rustls to work.
3738
let rustls_config = rustls::ClientConfig::builder()
3839
.with_safe_defaults()
3940
.with_root_certificates(root_certs())
@@ -58,4 +59,4 @@ fn root_certs() -> rustls::RootCertStore {
5859
let certs: Vec<_> = certs.into_iter().map(|cert| cert.0).collect();
5960
roots.add_parsable_certificates(&certs);
6061
roots
61-
}
62+
}

0 commit comments

Comments
 (0)