simplify run
This commit is contained in:
parent
cad7822c16
commit
f5e2be9651
@ -1,3 +1,4 @@
|
|||||||
|
use anyhow::Context;
|
||||||
use sieverman::ConnectionInfo;
|
use sieverman::ConnectionInfo;
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
|
|
||||||
@ -12,13 +13,7 @@ pub(crate) async fn run(
|
|||||||
info!("connecting…");
|
info!("connecting…");
|
||||||
let future_info = info.connect();
|
let future_info = info.connect();
|
||||||
info!("waiting for the connection to be established");
|
info!("waiting for the connection to be established");
|
||||||
let mut connected = match future_info.await {
|
let mut connected = future_info.await.context("Something went wrong")?;
|
||||||
Ok(v) => v,
|
|
||||||
Err(e) => {
|
|
||||||
info!("Failed to connect: {:?}", e);
|
|
||||||
panic!("Something went wrong");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
info!("Fully read the introduction:");
|
info!("Fully read the introduction:");
|
||||||
to_frontend_tx
|
to_frontend_tx
|
||||||
@ -27,5 +22,6 @@ pub(crate) async fn run(
|
|||||||
))
|
))
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user