diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-20 01:34:42 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-20 01:34:42 +0100 |
commit | 371a647536c735118a66522fc46f86a0ec09e2d7 (patch) | |
tree | 53874e056e34a9bbd8516fafc5fdafcdf936c972 /src/main.rs | |
parent | cb3a9e58dbfa65da655c68e21d5bf270c4ccb7ef (diff) |
just formatting
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 8dbc7d0..2871fc7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ +mod database; mod routes; mod structs; -mod database; use actix_web::{web, App, HttpServer}; use dotenv::dotenv; @@ -8,7 +8,7 @@ use std::sync::Arc; #[derive(Clone)] struct AppState { - database: Arc<database::DatabaseWrapper> + database: Arc<database::DatabaseWrapper>, } #[actix_web::main] @@ -19,9 +19,11 @@ async fn main() -> std::io::Result<()> { env_logger::init(); dotenv().ok(); - let db_raw = database::DatabaseWrapper::new().await.expect("Something went wrong -- DatabaseWrapper::new()"); + let db_raw = database::DatabaseWrapper::new() + .await + .expect("Something went wrong -- DatabaseWrapper::new()"); let db = Arc::new(db_raw); - let app_state = AppState{database: db}; + let app_state = AppState { database: db }; HttpServer::new(move || { App::new() |