Skip to content

Commit

Permalink
Drop Rocket inside the tokio async context when using launch
Browse files Browse the repository at this point in the history
Moves error printing and the implicit drop inside the tokio runtime
when using the `#[launch]` attribute.
  • Loading branch information
the10thWiz committed Aug 10, 2024
1 parent db598be commit acac38a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/codegen/src/attribute/entry/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ impl EntryAttr for Launch {
#[allow(dead_code)] #f

#vis #sig {
#_error::Error::report(::rocket::async_main(#launch))
::rocket::async_main(async move {
#_error::Error::report(#launch.await)
})
}
))
}
Expand Down

0 comments on commit acac38a

Please sign in to comment.