1
0
mirror of https://github.com/actix/examples synced 2024-11-23 14:31:07 +01:00

chore: fmt

This commit is contained in:
Rob Ede 2023-07-22 22:29:35 +01:00
parent de0411ca31
commit db35977fbe
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -145,13 +145,11 @@ async fn main() -> std::io::Result<()> {
let pool = config.pg.create_pool(None, NoTls).unwrap();
let server = HttpServer::new(move || {
App::new()
.app_data(web::Data::new(pool.clone()))
.service(
web::resource("/users")
.route(web::post().to(add_user))
.route(web::get().to(get_users))
)
App::new().app_data(web::Data::new(pool.clone())).service(
web::resource("/users")
.route(web::post().to(add_user))
.route(web::get().to(get_users)),
)
})
.bind(config.server_addr.clone())?
.run();