Skip to content

Commit d401db3

Browse files
authored
pub use ResultDynErrExt in tide::error (#253)
pub use ResultDynErrExt in tide::error
2 parents 82e990c + b47e780 commit d401db3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/error.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use core::pin::Pin;
22
use futures::future::Future;
33

4-
pub use tide_core::error::{EndpointResult, Error, ResponseExt, ResultExt, StringError};
4+
pub use tide_core::error::{
5+
EndpointResult, Error, ResponseExt, ResultDynErrExt, ResultExt, StringError,
6+
};
57

68
pub(crate) type BoxTryFuture<T> = Pin<Box<dyn Future<Output = EndpointResult<T>> + Send + 'static>>;

tide-core/src/error.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ pub trait ResultExt<T>: Sized {
7979
self.with_err_status(500)
8080
}
8181

82-
/// Convert to an `EndpointResult`, wrapping the `Err` case with a custom
83-
/// response status.
82+
/// Convert to an `EndpointResult`, wrapping the `Err` case with a custom response status.
8483
fn with_err_status<S>(self, status: S) -> EndpointResult<T>
8584
where
8685
StatusCode: HttpTryFrom<S>;
@@ -111,8 +110,7 @@ pub trait ResultDynErrExt<T>: Sized {
111110
self.with_err_status(500)
112111
}
113112

114-
/// Convert to an `EndpointResult`, wrapping the `Err` case with a custom
115-
/// response status.
113+
/// Convert to an `EndpointResult`, wrapping the `Err` case with a custom response status.
116114
fn with_err_status<S>(self, status: S) -> EndpointResult<T>
117115
where
118116
StatusCode: HttpTryFrom<S>;

0 commit comments

Comments
 (0)