Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
septum committed Feb 17, 2024
1 parent 54d52a5 commit 9ced21a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<(), std::io::Error> {

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");

Expand Down
4 changes: 2 additions & 2 deletions tests/health_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ async fn spawn_app() -> TestApp {

pub async fn configure_database(configuration: &DatabaseSettings) -> PgPool {
let mut connection =
PgConnection::connect(&configuration.connection_string_without_db().expose_secret())
PgConnection::connect(configuration.connection_string_without_db().expose_secret())
.await
.expect("Failed to connect to Postgres");
connection
.execute(format!(r#"CREATE DATABASE "{}";"#, configuration.database_name).as_str())
.await
.expect("Failed to create database.");

let connection_pool = PgPool::connect(&configuration.connection_string().expose_secret())
let connection_pool = PgPool::connect(configuration.connection_string().expose_secret())
.await
.expect("Failed to connect to Postgres");
sqlx::migrate!("./migrations")
Expand Down

0 comments on commit 9ced21a

Please sign in to comment.