mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-11 02:26:33 +00:00
Fix clippy errors
This commit is contained in:
parent
6ee13add72
commit
67247e070f
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ async fn main() -> std::io::Result<()> {
|
|||
|
||||
let configuration = get_configuration().expect("Failed to read configuration.");
|
||||
let connection_pool =
|
||||
PgPool::connect(&configuration.database.connection_string().expose_secret())
|
||||
PgPool::connect(configuration.database.connection_string().expose_secret())
|
||||
.await
|
||||
.expect("Failed to connect to Postgres.");
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ async fn spawn_app() -> TestApp {
|
|||
pub async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
||||
// Create database
|
||||
let mut connection =
|
||||
PgConnection::connect(&config.connection_string_without_db().expose_secret())
|
||||
PgConnection::connect(config.connection_string_without_db().expose_secret())
|
||||
.await
|
||||
.expect("Failed to connect to Postgres");
|
||||
connection
|
||||
|
@ -59,7 +59,7 @@ pub async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
|||
.expect("Failed to create database.");
|
||||
|
||||
// Migrate database
|
||||
let connection_pool = PgPool::connect(&config.connection_string().expose_secret())
|
||||
let connection_pool = PgPool::connect(config.connection_string().expose_secret())
|
||||
.await
|
||||
.expect("Failed to connect to Postgres.");
|
||||
sqlx::migrate!("./migrations")
|
||||
|
|
Loading…
Reference in a new issue