From 80357570090fdbe4be7e98660d70184173da77f8 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Tue, 13 Apr 2021 22:23:47 -0400 Subject: [PATCH] Move startup to separate from `main` for better errors --- src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; +} -- 2.39.5