diff --git a/peach-config/src/main.rs b/peach-config/src/main.rs index 47e8b43..754083e 100644 --- a/peach-config/src/main.rs +++ b/peach-config/src/main.rs @@ -197,20 +197,15 @@ async fn run() { ) } } - }, - PeachConfig::WaitForSbot => { - match wait_for_sbot::wait_for_sbot().await { - Ok(sbot_id) => { - println!("connected with sbot and found sbot_id: {:?}", sbot_id) - } - Err(err) => { - error!( - "peach-config did not successfully connect to sbot: {}", - err - ) - } - } } + PeachConfig::WaitForSbot => match wait_for_sbot::wait_for_sbot().await { + Ok(sbot_id) => { + println!("connected with sbot and found sbot_id: {:?}", sbot_id) + } + Err(err) => { + error!("peach-config did not successfully connect to sbot: {}", err) + } + }, } } } diff --git a/peach-config/src/wait_for_sbot.rs b/peach-config/src/wait_for_sbot.rs index 239e81a..602329e 100644 --- a/peach-config/src/wait_for_sbot.rs +++ b/peach-config/src/wait_for_sbot.rs @@ -21,12 +21,12 @@ pub async fn wait_for_sbot() -> Result { Ok(sbot_id) => { sbot_is_running = 1; whoami = Some(sbot_id) - }, + } Err(err) => { eprintln!("whoami failed: {:?}", err); } } - }, + } Err(err) => { eprintln!("failed to connect to sbot: {:?}", err); } @@ -37,6 +37,8 @@ pub async fn wait_for_sbot() -> Result { let two_seconds = time::Duration::from_secs(2); thread::sleep(two_seconds); } - }; - whoami.ok_or(PeachConfigError::WaitForSbotError{ message: "Failed to find sbot_id after 10 attempts".to_string()}) + } + whoami.ok_or(PeachConfigError::WaitForSbotError { + message: "Failed to find sbot_id after 10 attempts".to_string(), + }) }