Simplify launching Rocket

This commit is contained in:
Paul van Tilburg 2022-06-05 20:54:48 +02:00
parent 679a73ab63
commit 9ae7ea8eb4
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
1 changed files with 3 additions and 6 deletions

View File

@ -10,10 +10,7 @@
#![deny(missing_docs)]
/// Sets up and launches Rocket.
#[rocket::main]
async fn main() -> Result<(), rocket::Error> {
let rocket = podbringer::setup();
let _ = rocket.ignite().await?.launch().await?;
Ok(())
#[rocket::launch]
fn rocket() -> _ {
podbringer::setup()
}