Skip to content

Commit 3a87abd

Browse files
committed
Run cargo fmt
1 parent 95f46ac commit 3a87abd

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/routes/subscriptions.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ pub async fn subscribe(State(pool): State<PgPool>, Form(data): Form<FormData>) -
1818
data.email,
1919
data.name,
2020
Utc::now()
21-
).execute(&pool).await;
21+
)
22+
.execute(&pool)
23+
.await;
2224

2325
match result {
2426
Ok(_) => StatusCode::OK,
2527
Err(e) => {
2628
tracing::error!("Error in subscribing query: {e}");
2729
StatusCode::INTERNAL_SERVER_ERROR
28-
},
30+
}
2931
}
3032
}

tests/tests.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use sqlx::postgres::PgPoolOptions;
12
use sqlx::{Connection, Executor, PgConnection, PgPool};
23
use std::sync::Once;
3-
use sqlx::postgres::PgPoolOptions;
44
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
55
use uuid::Uuid;
66
use zero2prod::configuration::*;
@@ -54,7 +54,8 @@ async fn configure_database(config: &DatabaseSettings) -> PgPool {
5454
.await
5555
.unwrap();
5656

57-
connection.execute(format!(r#"CREATE DATABASE "{}""#, config.database_name).as_str())
57+
connection
58+
.execute(format!(r#"CREATE DATABASE "{}""#, config.database_name).as_str())
5859
.await
5960
.unwrap();
6061

0 commit comments

Comments
 (0)