Skip to content

Commit

Permalink
fix remaining compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicBurkart committed Dec 4, 2021
1 parent ef9283c commit bc65080
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions turbolift_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,25 @@ pub fn on(distribution_platform_: TokenStream, function_: TokenStream) -> TokenS
}

#[turbolift::tracing::instrument]
async fn turbolift_wrapper(turbolift::actix_web::web::Path((#untyped_params_tokens_with_run_id)): web::Path<(#param_types)>) -> impl turbolift::actix_web::Responder {
async fn turbolift_wrapper(turbolift::actix_web::web::Path((#untyped_params_tokens_with_run_id)): turbolift::actix_web::web::Path<(#param_types)>) -> impl turbolift::actix_web::Responder {
Ok(
turbolift::actix_web::HttpResponse::Ok()
.json(#function_name(#untyped_params_tokens))
)
}

#[turbolift::actix_web::main]
#[turbolift::tracing::instrument]
async fn main() -> std::io::Result<()> {
use actix_web::{App, HttpServer, HttpRequest, web};

fn main() -> std::io::Result<()> {
turbolift::actix_web::rt::System::new("main".to_string())
.block_on(async move {
let args: Vec<String> = std::env::args().collect();
let ip_and_port = &args[1];
turbolift::tracing::info!("service main() started. ip_and_port parsed.");
turbolift::actix_web::HttpServer::new(
||
turbolift::actix_web::App::new()
.route(
#wrapper_route, turbolift::actix_web::web::get().to(turbolift_wrapper)
"#wrapper_route", turbolift::actix_web::web::get().to(turbolift_wrapper)
)
.route(
"/health-probe", turbolift::actix_web::web::get().to(health_probe)
Expand All @@ -123,7 +122,8 @@ pub fn on(distribution_platform_: TokenStream, function_: TokenStream) -> TokenS
.run()
.compat()
.await
}
});
}
};

// copy all files in repo into cache
Expand Down

0 comments on commit bc65080

Please sign in to comment.