Created
October 12, 2021 18:04
-
-
Save tjmaynes/1954436d820be4440ab21cf6aac99c72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
let db_conn = PgPoolOptions::new() | |
.max_connections(5) | |
.connect_timeout(Duration::from_secs(2)) | |
.connect(database_url.as_str()) // <- Use the str version of database_url variable. | |
.await | |
.expect("Should have created a database connection"); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment