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