From b47e780552bd48e9353355f18c9eefe8b1fc06a5 Mon Sep 17 00:00:00 2001 From: updogliu Date: Tue, 21 May 2019 21:28:14 +0800 Subject: [PATCH] pub use ResultDynErrExt in tide::error --- src/error.rs | 4 +++- tide-core/src/error.rs | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/error.rs b/src/error.rs index 25ae1cc4b..6f987973b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,6 +1,8 @@ use core::pin::Pin; use futures::future::Future; -pub use tide_core::error::{EndpointResult, Error, ResponseExt, ResultExt, StringError}; +pub use tide_core::error::{ + EndpointResult, Error, ResponseExt, ResultDynErrExt, ResultExt, StringError, +}; pub(crate) type BoxTryFuture = Pin> + Send + 'static>>; diff --git a/tide-core/src/error.rs b/tide-core/src/error.rs index d7e748b6b..fa5d0db22 100644 --- a/tide-core/src/error.rs +++ b/tide-core/src/error.rs @@ -79,8 +79,7 @@ pub trait ResultExt: Sized { self.with_err_status(500) } - /// Convert to an `EndpointResult`, wrapping the `Err` case with a custom - /// response status. + /// Convert to an `EndpointResult`, wrapping the `Err` case with a custom response status. fn with_err_status(self, status: S) -> EndpointResult where StatusCode: HttpTryFrom; @@ -111,8 +110,7 @@ pub trait ResultDynErrExt: Sized { self.with_err_status(500) } - /// Convert to an `EndpointResult`, wrapping the `Err` case with a custom - /// response status. + /// Convert to an `EndpointResult`, wrapping the `Err` case with a custom response status. fn with_err_status(self, status: S) -> EndpointResult where StatusCode: HttpTryFrom;