From: Valentine Wallace Date: Wed, 14 Apr 2021 02:23:47 +0000 (-0400) Subject: Move startup to separate from `main` for better errors X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=80357570090fdbe4be7e98660d70184173da77f8;p=ldk-sample Move startup to separate from `main` for better errors --- diff --git a/src/main.rs b/src/main.rs index 4b1a8d5..5f5dc0a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -263,8 +263,7 @@ async fn handle_ldk_events( } } -#[tokio::main] -pub async fn main() { +async fn start_ldk() { let args = match cli::parse_startup_args() { Ok(user_args) => user_args, Err(()) => return, @@ -572,3 +571,8 @@ pub async fn main() { ) .await; } + +#[tokio::main] +pub async fn main() { + start_ldk().await; +}