Skip to content

Commit 3fe4e4f

Browse files
committed
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 f50b604 commit 3fe4e4f

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)