simplify error handling
This commit is contained in:
@@ -64,7 +64,7 @@ impl IntegratedHttpSward {
|
|||||||
pub async fn run_with_signal(
|
pub async fn run_with_signal(
|
||||||
mut self,
|
mut self,
|
||||||
mut signal: tokio::sync::oneshot::Receiver<()>,
|
mut signal: tokio::sync::oneshot::Receiver<()>,
|
||||||
) -> Result<(), HttpSwardError> {
|
) -> Result<(), tokio::sync::oneshot::error::RecvError> {
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
receive_result = &mut signal => {
|
receive_result = &mut signal => {
|
||||||
@@ -250,7 +250,4 @@ pub enum HttpSwardError {
|
|||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
BadUrl(#[from] url::ParseError),
|
BadUrl(#[from] url::ParseError),
|
||||||
|
|
||||||
#[error(transparent)]
|
|
||||||
ReceiverError(#[from] tokio::sync::oneshot::error::RecvError),
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user