Skip to content

Commit 0268007

Browse files
the10thWizSergioBenitez
authored andcommitted
Drop Rocket inside the tokio async context when using launch
Moves error printing and the implicit drop inside the tokio runtime when using the `#[launch]` attribute.
1 parent 9496b70 commit 0268007

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/codegen/src/attribute/entry/launch.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ impl EntryAttr for Launch {
113113
#[allow(dead_code)] #f
114114

115115
#vis #sig {
116-
#_error::Error::report(::rocket::async_main(#launch))
116+
::rocket::async_main(async move {
117+
#_error::Error::report(#launch.await)
118+
})
117119
}
118120
))
119121
}

0 commit comments

Comments
 (0)