diff --git a/src/main.rs b/src/main.rs index 414f320..8d1408f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,10 +24,8 @@ async fn main() -> Result<(), Error> { }; HttpServer::new(move || { - let data = data.clone(); - App::new() - .app_data(web::Data::new(data)) + .app_data(web::Data::new(data.clone())) .service(api::versions::res) .service(api::v1::web()) })