mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-03 14:46:31 +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 configuration = get_configuration().expect("Failed to read configuration.");
|
||||||
let connection_pool =
|
let connection_pool =
|
||||||
PgPool::connect(&configuration.database.connection_string().expose_secret())
|
PgPool::connect(configuration.database.connection_string().expose_secret())
|
||||||
.await
|
.await
|
||||||
.expect("Failed to connect to Postgres.");
|
.expect("Failed to connect to Postgres.");
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ async fn spawn_app() -> TestApp {
|
||||||
pub async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
pub async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
||||||
// Create database
|
// Create database
|
||||||
let mut connection =
|
let mut connection =
|
||||||
PgConnection::connect(&config.connection_string_without_db().expose_secret())
|
PgConnection::connect(config.connection_string_without_db().expose_secret())
|
||||||
.await
|
.await
|
||||||
.expect("Failed to connect to Postgres");
|
.expect("Failed to connect to Postgres");
|
||||||
connection
|
connection
|
||||||
|
@ -59,7 +59,7 @@ pub async fn configure_database(config: &DatabaseSettings) -> PgPool {
|
||||||
.expect("Failed to create database.");
|
.expect("Failed to create database.");
|
||||||
|
|
||||||
// Migrate database
|
// Migrate database
|
||||||
let connection_pool = PgPool::connect(&config.connection_string().expose_secret())
|
let connection_pool = PgPool::connect(config.connection_string().expose_secret())
|
||||||
.await
|
.await
|
||||||
.expect("Failed to connect to Postgres.");
|
.expect("Failed to connect to Postgres.");
|
||||||
sqlx::migrate!("./migrations")
|
sqlx::migrate!("./migrations")
|
||||||
|
|
Loading…
Reference in a new issue