Move startup to separate from `main` for better errors
authorValentine Wallace <vwallace@protonmail.com>
Wed, 14 Apr 2021 02:23:47 +0000 (22:23 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Mon, 3 May 2021 22:31:02 +0000 (18:31 -0400)
src/main.rs

index 4b1a8d5b82268b7706a79af64e4dfd2c1fdd1449..5f5dc0af87324ba4bf416829d8ea2fa1446036b0 100644 (file)
@@ -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;
+}